Simple STOMP client.
Parameters: |
|
---|
Example
>>> from stompy.simple import Client
>>> stomp = Client()
>>> stomp.connect()
>>> stomp.put("The quick brown fox...", destination="/queue/test")
>>> stomp.subscribe("/queue/test")
>>> message = stomp.get_nowait()
>>> message.body
'The quick brown fox...'
>>> stomp.ack(message)
>>> stomp.unsubscribe("/queue/test")
>>> stomp.disconnect()
Exception raised by Queue.get(block=0)/get_nowait().
Roll-back current transaction.
Acknowledge message.
Parameters: |
|
---|
Begin transaction.
Every ack() and send() will be affected by this transaction and won’t be real until a commit() is issued. To roll-back any changes since the transaction started use abort().
Commit current transaction.
Connect to the broker.
Parameters: |
|
---|
Disconnect from the broker.
Get message.
Parameters: |
|
---|---|
Raises Empty: | If block is off and no message was receied. |
Remove and return an item from the queue without blocking.
Only get an item if one is immediately available. Otherwise raise the Empty exception.
See get().
Put an item into the queue.
Parameters: |
|
---|---|
Returns: | The resulting stompy.frame.Frame instance. |
Subscribe to topic/queue.
Parameters: |
|
---|
Unsubscribe from topic/queue previously subscribed to.
Parameters: |
|
---|
Transaction related error.