Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
adding stomp jms bindings
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/activemq/stomp/trunk@797018 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dejanb committed Jul 23, 2009
1 parent a132577 commit 0fc6652
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion webgen/src/stomp10/additional.page
Expand Up @@ -68,4 +68,45 @@ To handle this the client may specify and ack header in a subscription request.
^@

ACK
message-id: ID:12345
message-id: ID:12345


#Stomp JMS Bindings

When using the Stomp Protocol with [StompConnect](http://stomp.codehaus.org/StompConnect) or a JMS provider there are some additional Stomp headers and semantics which are useful to know. In terms of JMS semantics Stomp supports the same ack modes unless the messages are exchanged within a transaction via BEGIN/COMMIT/ABORT

###Standard JMS Message Headers

The following standard JMS Headers are mapped to Stomp as follows; so these headers can be added to a SEND command when sending messages


<table>
<tr><th>Stomp header</th><th>JMS header</th><th>Description</th></tr>
<tr><td>correlation-id</td><td>JMSCorrelationID</td><td>good consumes will add this header to any responses they send so that entire conversations can be correlated</td></tr>
<tr><td>expires</td><td>JMSExpiration</td><td>the expiration time of the message</td></tr>
<tr><td>persistent</td><td>JMSDeliveryMode</td><td>whether or not the message is persistent</td></tr>
<tr><td>priority</td><td>JMSPriority</td><td>the priority on the message</td></tr>
<tr><td>reply-to</td><td>JMSReplyTo</td><td>the destination you should send replies to</td></tr>
<tr><td>type</td><td>JMSType</td><td>sets the type of the message</td></tr>
</table>

###Subscription headers

You can use an SQL 92 selector whenever you subscribe using the *selector* header

selector:location = 'London' and sex = 'M'

When subscribing for a topic you can specify the header

no-local:true

This will disable local messages. Namely messages published over the Stomp connection will not be received by this topic subscription.

###Durable Topic Subscribers

If you wish to create a _durable topic subscriber_ you will need to do the following

+ set the _client-id_ header on the CONNECT to a globally unique String for the Stomp connection
+ set the _durable-subscriber-name_ header on the SUBSCRIBE command.

The combination of the *client-id* and *durable-subscriber-name* uniquely identifies the durable topic subscription. i.e. after you restart your program and re-subscribe, the Broker will know which messages you need that were published while you were away

0 comments on commit 0fc6652

Please sign in to comment.