Liking cljdoc? Tell your friends :D

bowerick.jms

Functions for JMS interaction

Functions for JMS interaction
raw docstring

*broker-management-command-topic*clj

source

*broker-management-reply-topic*clj

source

*default-charset*clj

source

*force-sync-send*clj

source

*key-store-file*clj

source

*key-store-password*clj

source

*pooled-producer-auto-transmit-interval*clj

source

*producer-window-size*clj

source

*serializable-packages*clj

source

*trust-store-file*clj

source

*trust-store-password*clj

source

*user-name*clj

source

*user-password*clj

source

*ws-client-ping-heartbeat*clj

source

*ws-client-pong-heartbeat*clj

source

closeclj

(close o)

Close a producer or consumer.

Close a producer or consumer.
sourceraw docstring

close-ws-stomp-sessionclj

(close-ws-stomp-session session-map)
source

create-carbonite-consumerclj

(create-carbonite-consumer broker-url destination-description cb)
(create-carbonite-consumer broker-url destination-description cb pool-size)

Create a consumer that uses carbonite for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.

Create a consumer that uses carbonite for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.
sourceraw docstring

create-carbonite-lzf-consumerclj

(create-carbonite-lzf-consumer broker-url destination-description cb)
(create-carbonite-lzf-consumer broker-url destination-description cb pool-size)

Create a consumer that decompresses the transferred data with LZF and uses carbonite for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.

Create a consumer that decompresses the transferred data with LZF and uses carbonite for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.
sourceraw docstring

create-carbonite-lzf-producerclj

(create-carbonite-lzf-producer broker-url destination-description)
(create-carbonite-lzf-producer broker-url destination-description pool-size)

Create a producer that uses carbonite for serialization and compresses the serialized data with LZF.

For more details about producers please see create-producer.

Create a producer that uses carbonite for serialization and compresses the serialized data with LZF.

For more details about producers please see create-producer.
sourceraw docstring

create-carbonite-producerclj

(create-carbonite-producer broker-url destination-description)
(create-carbonite-producer broker-url destination-description pool-size)

Create a producer that uses carbonite for serialization.

For more details about producers please see create-producer.

Create a producer that uses carbonite for serialization.

For more details about producers please see create-producer.
sourceraw docstring

create-consumerclj

(create-consumer broker-url destination-description cb)
(create-consumer broker-url destination-description cb pool-size)
(create-consumer broker-url
                 destination-description
                 cb
                 pool-size
                 de-serialization-fn)

Create a message consumer for receiving data from the specified destination and server/broker.

The passed callback function (cb) will be called for each message and will receive the data from the message as its single argument.

Optionally, when passing a pool-size larger than 1, a pooled consumer is created. A pooled consumer receives data in batches and it is the counter part to a pooled producer.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given. Typically, this should be the inverse operation of the serialization function as used for the producer and defaults to identity.

Create a message consumer for receiving data from the specified destination and server/broker.

The passed callback function (cb) will be called for each message and will receive the data
from the message as its single argument.

Optionally, when passing a pool-size larger than 1, a pooled consumer is created.
A pooled consumer receives data in batches and it is the counter part to a pooled producer.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given.
Typically, this should be the inverse operation of the serialization function as used for the producer and defaults to identity.
sourceraw docstring

create-failsafe-json-consumerclj

(create-failsafe-json-consumer broker-url destination-description cb)
(create-failsafe-json-consumer broker-url destination-description cb pool-size)
(create-failsafe-json-consumer broker-url
                               destination-description
                               cb
                               pool-size
                               pre-process-fn)
source

create-json-consumerclj

(create-json-consumer broker-url destination-description cb)
(create-json-consumer broker-url destination-description cb pool-size)
(create-json-consumer broker-url
                      destination-description
                      cb
                      pool-size
                      pre-process-fn)

Create a consumer for exchanging data in JSON format.

The consumer expects to receive the byte array representation of a string of JSON encoded data. The default charset that is used is UTF-8.

One aim of this consumer is to enable effortless exchange between various transports, such as, OpenWire, STOMP, WS, or MQTT.

An optional pre-process-fn can be used to pre-process the received byte array data before its de-serialization. One use case for this is, e.g., to uncompress or decrypt the received byte array data. Typically, the pre-process-fn is expected to accept and return a byte array and defaults to identity. The pre-process-fn is expected to be the inverse operation of the post-process-fn that was used for the JSON producer (See create-json-producer.).

For more details about consumers please see create-consumer.

Create a consumer for exchanging data in JSON format.

The consumer expects to receive the byte array representation of a string of JSON encoded data.
The default charset that is used is UTF-8.

One aim of this consumer is to enable effortless exchange between various transports, such as, OpenWire, STOMP, WS, or MQTT.

An optional pre-process-fn can be used to pre-process the received byte array data before its de-serialization.
One use case for this is, e.g., to uncompress or decrypt the received byte array data.
Typically, the pre-process-fn is expected to accept and return a byte array and defaults to identity.
The pre-process-fn is expected to be the inverse operation of the post-process-fn that was used for the JSON producer (See create-json-producer.).

For more details about consumers please see create-consumer.
sourceraw docstring

create-json-lzf-consumerclj

(create-json-lzf-consumer broker-url destination-description cb)
(create-json-lzf-consumer broker-url destination-description cb pool-size)
source

create-json-lzf-producerclj

(create-json-lzf-producer broker-url destination-description)
(create-json-lzf-producer broker-url destination-description pool-size)
source

create-json-producerclj

(create-json-producer broker-url destination-description)
(create-json-producer broker-url destination-description pool-size)
(create-json-producer broker-url
                      destination-description
                      pool-size
                      post-process-fn)

Create a producer for exchanging data in JSON format.

The passed data will be converted to JSON via Cheshire. The JSON string will then be sent as byte array representation. The default charset that is used is UTF-8.

One aim of this producer is to enable effortless exchange between various transports, such as, OpenWire, STOMP, WS, or MQTT.

An optional post-process-fn can be used to further process the byte array data resulting from the serialization. One use case for this is, e.g., to compress or encrypt the byte array data. Typically, the post-process-fn is expected to accept and return a byte array and defaults to identity.

For more details about producers please see create-producer.

Create a producer for exchanging data in JSON format.

The passed data will be converted to JSON via Cheshire.
The JSON string will then be sent as byte array representation.
The default charset that is used is UTF-8.

One aim of this producer is to enable effortless exchange between various transports, such as, OpenWire, STOMP, WS, or MQTT.

An optional post-process-fn can be used to further process the byte array data resulting from the serialization.
One use case for this is, e.g., to compress or encrypt the byte array data.
Typically, the post-process-fn is expected to accept and return a byte array and defaults to identity.

For more details about producers please see create-producer.
sourceraw docstring

create-json-snappy-consumerclj

(create-json-snappy-consumer broker-url destination-description cb)
(create-json-snappy-consumer broker-url destination-description cb pool-size)
source

create-json-snappy-producerclj

(create-json-snappy-producer broker-url destination-description)
(create-json-snappy-producer broker-url destination-description pool-size)
source

create-mqtt-clientclj

(create-mqtt-client broker-url)
source

create-nippy-consumerclj

(create-nippy-consumer broker-url destination-description cb)
(create-nippy-consumer broker-url destination-description cb pool-size)
(create-nippy-consumer broker-url
                       destination-description
                       cb
                       pool-size
                       nippy-opts)

Create a consumer that uses nippy for de-serialization.

Optionally, a map of options for customizing the nippy serialization, nippy-opts, can be given. See also: create-pooled-nippy-producer. For uncompressing compressed data, no options need to be specified as nippy can figure out the employed compression algorithms on its own.

For more details about consumers and producers please see create-consumer and create-producer.

Create a consumer that uses nippy for de-serialization.

Optionally, a map of options for customizing the nippy serialization, nippy-opts, can be given.
See also: create-pooled-nippy-producer.
For uncompressing compressed data, no options need to be specified as nippy can figure out the employed compression algorithms on its own.

For more details about consumers and producers please see create-consumer and create-producer.
sourceraw docstring

create-nippy-lzf-consumerclj

(create-nippy-lzf-consumer broker-url destination-description cb)
(create-nippy-lzf-consumer broker-url destination-description cb pool-size)
(create-nippy-lzf-consumer broker-url
                           destination-description
                           cb
                           pool-size
                           nippy-opts)

Create a consumer that uncompresses the transferred data via LZF and uses nippy for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.

Create a consumer that uncompresses the transferred data via LZF and uses nippy for de-serialization.

For more details about consumers and producers please see create-consumer and create-producer.
sourceraw docstring

create-nippy-lzf-producerclj

(create-nippy-lzf-producer broker-url destination-description)
(create-nippy-lzf-producer broker-url destination-description pool-size)
(create-nippy-lzf-producer broker-url
                           destination-description
                           pool-size
                           nippy-opts)

Create a producer that uses nippy for serialization and compresses the serialized data with LZF.

For more details about producers please see create-producer.

Create a producer that uses nippy for serialization and compresses the serialized data with LZF.

For more details about producers please see create-producer.
sourceraw docstring

create-nippy-producerclj

(create-nippy-producer broker-url destination-description)
(create-nippy-producer broker-url destination-description pool-size)
(create-nippy-producer broker-url destination-description pool-size nippy-opts)

Create a producer that uses nippy for serialization.

Optionally, a map of options for customizing the nippy serialization, nippy-opts, can be given. This can be used, e.g., for enabling compression or encryption. Compression can be enabled with {:compressor taoensso.nippy/lz4-compressor}. Possible compressor settings are: taoensso.nippy/lz4-compressor, taoensso.nippy/snappy-compressor, taoensso.nippy/lzma2-compressor.

For more details about producers please see create-producer.

Create a producer that uses nippy for serialization.

Optionally, a map of options for customizing the nippy serialization, nippy-opts, can be given.
This can be used, e.g., for enabling compression or encryption.
Compression can be enabled with {:compressor taoensso.nippy/lz4-compressor}.
Possible compressor settings are: taoensso.nippy/lz4-compressor, taoensso.nippy/snappy-compressor, taoensso.nippy/lzma2-compressor.

For more details about producers please see create-producer.
sourceraw docstring

create-pooled-consumerclj

(create-pooled-consumer broker-url destination-description cb)
(create-pooled-consumer broker-url
                        destination-description
                        cb
                        de-serialization-fn)

Create a consumer for receiving pooled data.

The callback function, cb, will be called for each data instance in the pool individually.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given. Typically, this should be the inverse operation of the serialization function as used for the pooled producer and defaults to identity.

This function is not intended to be used directly. It is recommended to use create-consumer or the various create-XXXXXX-consumer derivatives that employ customized serialization mechanisms instead.

Create a consumer for receiving pooled data.

The callback function, cb, will be called for each data instance in the pool individually.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given.
Typically, this should be the inverse operation of the serialization function as used for the pooled producer and defaults to identity.

This function is not intended to be used directly.
It is recommended to use create-consumer or the various create-XXXXXX-consumer derivatives that employ
customized serialization mechanisms instead.
sourceraw docstring

create-pooled-producerclj

(create-pooled-producer broker-url destination-description pool-size)
(create-pooled-producer broker-url
                        destination-description
                        pool-size
                        serialization-fn)

Create a pooled producer with the given pool-size for the given broker-url and destination-description.

A pooled producer does not send the passed data instances individually but groups them in a pool and sends the entire pool at once when the pool is filled.

Optionally, a single argument function for customizing the serialization of the pooled-data can be given. This defaults to identity such that the default serialization of the underlying JMS implementation is used.

This function is not intended to be used directly. It is recommended to use create-producer or the various create-XXXXXX-producer derivatives that employ customized serialization mechanisms instead.

Create a pooled producer with the given pool-size for the given broker-url and destination-description.

A pooled producer does not send the passed data instances individually but groups them in a pool and
sends the entire pool at once when the pool is filled.

Optionally, a single argument function for customizing the serialization of the pooled-data can be given.
This defaults to identity such that the default serialization of the underlying JMS implementation is used.

This function is not intended to be used directly.
It is recommended to use create-producer or the various create-XXXXXX-producer derivatives that employ
customized serialization mechanisms instead.
sourceraw docstring

create-producerclj

(create-producer broker-url destination-description)
(create-producer broker-url destination-description pool-size)
(create-producer broker-url destination-description pool-size serialization-fn)

This is a convenience function for creating a producer for the given broker-url and destination-description.

The created producer implements IFn. Hence, the idiomatic way for using it in Clojure is to use the producer as a function to which the data that is to be transmitted is passed as single function argument.

By default a single-step producer will be created that immediately sends the passed data.

Optionally, when passing a pool-size larger than 1, a pooled producer is created. A pooled producer does not send the passed data instances individually but groups them in a pool and sends the entire pool at once when the pool is filled.

Optionally, a single argument function for customizing the serialization of the pooled-data can be given. This defaults to idenitity such that the default serialization of the underlying JMS implementation is used.

This is a convenience function for creating a producer for the given broker-url and destination-description.

The created producer implements IFn. Hence, the idiomatic way for using it in Clojure
is to use the producer as a function to which the data that is to be transmitted is
passed as single function argument.

By default a single-step producer will be created that immediately sends the passed data.

Optionally, when passing a pool-size larger than 1, a pooled producer is created.
A pooled producer does not send the passed data instances individually but groups them in a pool and
sends the entire pool at once when the pool is filled.

Optionally, a single argument function for customizing the serialization of the pooled-data can be given.
This defaults to idenitity such that the default serialization of the underlying JMS implementation is used.
sourceraw docstring

create-single-consumerclj

(create-single-consumer broker-url destination-description cb)
(create-single-consumer broker-url
                        destination-description
                        cb
                        de-serialization-fn)

Create a message consumer for receiving data from the specified destination and server/broker.

The passed callback function (cb) will be called for each message and will receive the data from the message as its single argument.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given. Typically, this should be the inverse operation of the serialization function as used for the producer and defaults to identity.

This function is not intended to be used directly. It is recommended to use create-consumer or the various create-XXXXXX-consumer derivatives that employ customized serialization mechanisms instead.

Create a message consumer for receiving data from the specified destination and server/broker.

The passed callback function (cb) will be called for each message and will receive the data
from the message as its single argument.

Optionally, a single argument function for customizing the de-serialization of the transferred data can be given.
Typically, this should be the inverse operation of the serialization function as used for the producer and defaults to identity.

This function is not intended to be used directly.
It is recommended to use create-consumer or the various create-XXXXXX-consumer derivatives that employ
customized serialization mechanisms instead.
sourceraw docstring

create-single-producerclj

(create-single-producer broker-url destination-description)
(create-single-producer broker-url destination-description serialization-fn)

Create a message producer for sending data to the specified destination and server/broker.

The created producer implements IFn. Hence, the idiomatic way for using it in Clojure is to use the producer as a function to which the data that is to be transmitted is passed as single function argument.

For each invocation, the passed data will be transmitted in a separate message.

Optionally, a single argument function for customizing the serialization of the data can be given. This defaults to idenitity such that the default serialization of the underlying JMS implementation is used.

This function is not intended to be used directly. It is recommended to use create-producer or the various create-XXXXXX-producer derivatives that employ customized serialization mechanisms instead.

Create a message producer for sending data to the specified destination and server/broker.

The created producer implements IFn. Hence, the idiomatic way for using it in Clojure
is to use the producer as a function to which the data that is to be transmitted is
passed as single function argument.

For each invocation, the passed data will be transmitted in a separate message.

Optionally, a single argument function for customizing the serialization of the data can be given.
This defaults to idenitity such that the default serialization of the underlying JMS implementation is used.

This function is not intended to be used directly.
It is recommended to use create-producer or the various create-XXXXXX-producer derivatives that employ
customized serialization mechanisms instead.
sourceraw docstring

create-ws-stomp-sessionclj

(create-ws-stomp-session broker-url)
source

fallback-serializationclj

(fallback-serialization data)
source

get-adjusted-ssl-contextclj

(get-adjusted-ssl-context)

Get an SSLContext for which the key and trust stores are initialized based on the settings defined in the global dynamic vars: key-store-file key-store-password trust-store-file trust-store-password

Get an SSLContext for which the key and trust stores are initialized based
on the settings defined in the global dynamic vars:
*key-store-file* *key-store-password*
*trust-store-file* *trust-store-password*
sourceraw docstring

get-destinationsclj

(get-destinations broker)
(get-destinations broker include-destinations-without-producers)

Get a lexicographically sorted list of destinations that exist for the given borker-service Optionally, destinations without producers can be excluded by setting include-destinations-without-producers to false.

Get a lexicographically sorted list of destinations that exist for the given borker-service
Optionally, destinations without producers can be excluded by setting
include-destinations-without-producers to false.
sourceraw docstring

msg-prop-keyclj

source

remove-url-optionsclj

(remove-url-options url)
source

send-error-msgclj

(send-error-msg producer msg)
source

setup-broker-with-authclj

(setup-broker-with-auth allow-anon users permissions)
source

start-brokerclj

(start-broker address)
(start-broker address allow-anon users permissions)

Start an embedded ActiveMQ broker. Examples for valid addresses are:

ssl://127.0.0.1:424

ssl://127.0.0.1:42425?needClientAuth=true

stomp+ssl://127.0.0.1:42423

stomp+ssl://127.0.0.1:42423?needClientAuth=true

wss://127.0.0.1:42427

wss://127.0.0.1:42427?needClientAuth=true

mqtt+ssl://127.0.0.1:42429

mqtt+ssl://127.0.0.1:42429?needClientAuth=true

tcp://127.0.0.1:42424

udp://127.0.0.1:42426

ws://127.0.0.1:42428

mqtt://127.0.0.1:42430

In addition to the address, it is possible to configure the access control: When allow-anon is true, anonymous access is allowed. The list of users is defined as a vector of maps, e.g.:

[{"name" "test-user", "password" "secret", "groups" "test-group,admins,publishers,consumers"}]

Permissions are also defined as a vector of maps, e.g.:

[{"target" "test.topic.a", "type" "topic", "write" "anonymous"}

Start an embedded ActiveMQ broker.
Examples for valid addresses are: 

ssl://127.0.0.1:424

ssl://127.0.0.1:42425?needClientAuth=true

stomp+ssl://127.0.0.1:42423

stomp+ssl://127.0.0.1:42423?needClientAuth=true

wss://127.0.0.1:42427

wss://127.0.0.1:42427?needClientAuth=true

mqtt+ssl://127.0.0.1:42429

mqtt+ssl://127.0.0.1:42429?needClientAuth=true

tcp://127.0.0.1:42424

udp://127.0.0.1:42426

ws://127.0.0.1:42428

mqtt://127.0.0.1:42430

In addition to the address, it is possible to configure the access control:
When allow-anon is true, anonymous access is allowed.
The list of users is defined as a vector of maps, e.g.:

[{"name" "test-user", "password" "secret", "groups" "test-group,admins,publishers,consumers"}]

Permissions are also defined as a vector of maps, e.g.:

[{"target" "test.topic.a", "type" "topic", "write" "anonymous"}
sourceraw docstring

stopclj

(stop brkr)
source

with-destinationcljmacro

(with-destination broker-url destination-description & body)

Execute body in a context for which connection, session, and destination are made available based on the provided broker-url and destination-description.

The broker-url is the address of the broker to which a connection shall be establishd. Examples for valid address schemes are given in the doc string of start-broker.

Destination descriptions have the form "/<type>/<name>" for which "<type>" is currently either "topic" or "queue" and the "<name>" is the unique name of the destination.

Execute body in a context for which connection, session, and destination are
made available based on the provided broker-url and destination-description.

The broker-url is the address of the broker to which a connection shall
be establishd. Examples for valid address schemes are given in the doc
string of start-broker.

Destination descriptions have the form "/<type>/<name>" for which "<type>"
is currently either "topic" or "queue" and the "<name>" is the unique
name of the destination.
sourceraw docstring

ws-scheduler-idclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close