Thin Clojure wrapper for JMS client-side usage.
Thin Clojure wrapper for JMS client-side usage.
(byte-message-producer session producer)
Creates producer function, which sends given bytes data as a ByteMessage to producer's destination.
Creates producer function, which sends given bytes data as a ByteMessage to producer's destination.
(create-byte-message session-or-context data)
javax.jms.ByteMessage. session-or-context is either Session or JMSContext.
javax.jms.ByteMessage. session-or-context is either Session or JMSContext.
(create-connection connection-factory)
(create-connection connection-factory {:keys [username password ex-listener]})
Creates connection to given connection factory. Doesn't start the connection. Options map: - :username - :password - :ex-listener - sets exception listener for connection, see exception-listener.
Creates connection to given connection factory. Doesn't start the connection. Options map: - :username - :password - :ex-listener - sets exception listener for connection, see exception-listener.
(create-context cf)
(create-context cf
{:keys [session-mode username password ex-listener]
:or {session-mode JMSContext/AUTO_ACKNOWLEDGE}})
Creates JMSContext (JMS 2.0). Optional parameters as map:
Creates JMSContext (JMS 2.0). Optional parameters as map: - :username - :password - :session-mode (see JMSContext API docs) - :ex-listener (ExceptionListener)
(create-jms-producer ctx)
(create-jms-producer ctx
{:keys [delivery-mode delivery-delay ttl correlation-id
reply-to]})
Creates JMS 2.0 defined JMSProducer. Optional parameters as map:
Creates JMS 2.0 defined JMSProducer. Optional parameters as map: - :delivery-mode - :delivery-delay - :ttl - :correlation-id - :reply-to
(create-producer session destination)
Creates message producer for given destination (JMS 1.1)
Creates message producer for given destination (JMS 1.1)
(create-session conn)
(create-session conn session-mode)
JMS 2.0 spec'd session creator.
JMS 2.0 spec'd session creator.
(create-text-message session-or-context data)
javax.jms.TextMessage. session-or-context is either Session or JMSContext.
javax.jms.TextMessage. session-or-context is either Session or JMSContext.
(exception-listener listener-fn)
Implements ExceptionListener. Passes exception to given listener-fn.
Implements ExceptionListener. Passes exception to given listener-fn.
(listen session destination listener-fn)
Start consuming destination with listener-fn, which can be a Clojure function or instance of javax.jms.MessageListener. Returns created consumer.
Start consuming destination with listener-fn, which can be a Clojure function or instance of javax.jms.MessageListener. Returns created consumer.
(message-listener cb)
Creates a MessageListener instance. Given callback function is fed with data from javax.jms.Message. Data type depends on message type: ByteMessage -> bytes, TextMessage -> string, ObjectMessage -> object.
Creates a MessageListener instance. Given callback function is fed with data from javax.jms.Message. Data type depends on message type: ByteMessage -> bytes, TextMessage -> string, ObjectMessage -> object.
Protocol for creating instance of javax.jms.Message.
Protocol for creating instance of javax.jms.Message.
(create-message data session)
Create Message depending on type of data.
Create Message depending on type of data.
(producer-fn producer message-fn)
Returns function that takes one parameter: data to be sent. The data is sent via producer's send method. message-fn is called with raw data to create needed javax.jms.Message. Thus message-fn should create a javax.jms.Message which can be send with producer.
Returns function that takes one parameter: data to be sent. The data is sent via producer's send method. message-fn is called with raw data to create needed javax.jms.Message. Thus message-fn should create a javax.jms.Message which can be send with producer.
(send-with-context cf dest data & [options-map])
JMS 2.0 style producing. Creates context, sends data to destination and finally closes context. Message is created by default with 'create-message'. 'create-message' function can be extended for other types than String and bytes. Also message creating function can be passed as :message-fn option. That function is invoked with two params: data and the created context. Options map is passed to create-context and create-jms-producer, see them for usable keys.
JMS 2.0 style producing. Creates context, sends data to destination and finally closes context. Message is created by default with 'create-message'. 'create-message' function can be extended for other types than String and bytes. Also message creating function can be passed as :message-fn option. That function is invoked with two params: data and the created context. Options map is passed to create-context and create-jms-producer, see them for usable keys.
(set-listener consumer listener-fn)
Set a MessageListener for consumer. Listener-fn can be instance of MessageListener or a regular Clojure function. For regular function, an MessageListener instance is created and the function is fed with data from javax.jms.Message. Given consumer is returned.
Set a MessageListener for consumer. Listener-fn can be instance of MessageListener or a regular Clojure function. For regular function, an MessageListener instance is created and the function is fed with data from javax.jms.Message. Given consumer is returned.
(set-message-properties msg properties)
Sets given properties (a map) into Message. Returns possibly mutated msg.
Sets given properties (a map) into Message. Returns possibly mutated msg.
(text-message-producer session producer)
Creates producer function, which sends given data as a TextMessage to producer's destination.
Creates producer function, which sends given data as a TextMessage to producer's destination.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close