Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • Sending Messages
  • Receiving Messages
  • Message abstraction
  • Java Doc

Sending Messages

The Session class provides the following methods to send messages.

...

To receive messages you can subscribe using the following method

Code Block
borderStylesolid
public interface Session{
.........

public void messageSubscribe(String queue, String destination, short confirmMode, short acquireMode,
                                 MessagePartListener listener, Map<String, ?> filter, Option... options);
-----
}

...

Code Block
borderStylesolid
public interface MessageListener{
 
 public void onMessage(Message message);  

}

you can use it the following way.

Code Block
borderStylesolid

.........

 MessageListener myMessageListener .... 

 session.messageSubscribe(....,new MessagePartListenerDapter(myMessageListener),...);
-----

Message abstraction

Message Interface provides an abstraction for creating messages from different data streams.
Please read the java doc for a complete description of each method.

...