How to Send a Message to an Apache ActiveMQ Topic with Open Dylan


module: activemq-sample

define function main (name :: <string>, arguments :: <vector>)

  let sock = make(<TCP-socket>, host: "localhost", port: 61613);

  write(sock, "CONNECT\n\n\0");

  write(sock, "SEND\ndestination:/topic/SampleTopic\n\nSimples Assim\0");

  write(sock, "DISCONNECT\n\n\0");

end function;

main(application-name(), application-arguments());


library: activemq-sample
files: library


module: dylan-user

define library activemq-sample
  use common-dylan;

  use io;

  use network;

  export activemq-sample;
end library;

define module activemq-sample
  use common-dylan;

  use streams;

  use sockets;
end module;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s