Namespace bowerick.jms

Functions for JMS interaction

Other Namespaces

Show/Hide
bowerick.JmsController
JMS controller for ActiveMQ.
bowerick.java-interfaces
Interfaces for Java interop.
bowerick.main
Main class to start the bowerick stand-alone application.
bowerick.message-generator
Functions for generating messages
Index Page
Alphabetic Var Index

Public Vars

Usage Documentation

Show/Hide
Functions for JMS interaction
Back to top

Details of Public Vars

Dynamic Var: *broker-management-command-topic*

  No docs attached.
Back to top View Source

Dynamic Var: *broker-management-reply-topic*

  No docs attached.
Back to top View Source

Dynamic Var: *default-charset*

  No docs attached.
Back to top View Source

Dynamic Var: *force-sync-send*

  No docs attached.
Back to top View Source

Dynamic Var: *key-store-file*

  No docs attached.
Back to top View Source

Dynamic Var: *key-store-password*

  No docs attached.
Back to top View Source

Dynamic Var: *mqtt-max-in-flight*

  No docs attached.
Back to top View Source

Dynamic Var: *pooled-producer-auto-transmit-interval*

  No docs attached.
Back to top View Source

Dynamic Var: *producer-window-size*

  No docs attached.
Back to top View Source

Dynamic Var: *serializable-allowlist*

  No docs attached.
Back to top View Source

Dynamic Var: *serializable-packages*

  No docs attached.
Back to top View Source

Dynamic Var: *trust-store-file*

  No docs attached.
Back to top View Source

Dynamic Var: *trust-store-password*

  No docs attached.
Back to top View Source

Dynamic Var: *user-name*

  No docs attached.
Back to top View Source

Dynamic Var: *user-password*

  No docs attached.
Back to top View Source

Dynamic Var: *ws-client-ping-heartbeat*

  No docs attached.
Back to top View Source

Dynamic Var: *ws-client-pong-heartbeat*

  No docs attached.
Back to top View Source

Constructor: ->ConsumerWrapper

Arglists:
=========

  (->ConsumerWrapper close-fn)

Docstring:
==========

  Positional factory function for class bowerick.jms.ConsumerWrapper.
Back to top View Source

Constructor: ->ProducerWrapper

Arglists:
=========

  (->ProducerWrapper send-fn send-fn-opt-args close-fn)

Docstring:
==========

  Positional factory function for class bowerick.jms.ProducerWrapper.
Back to top View Source

Function: close

Arglists:
=========

  (close o)

Docstring:
==========

  Close a producer or consumer.
Back to top View Source

Function: close-ws-stomp-session

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-carbonite-consumer

Arglists:
=========

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

Docstring:
==========

  Create a consumer that uses carbonite for de-serialization.

   For more details about consumers and producers please see create-consumer and create-producer.
Back to top View Source

Function: create-carbonite-lzf-consumer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-carbonite-lzf-producer

Arglists:
=========

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

Docstring:
==========

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

   For more details about producers please see create-producer.
Back to top View Source

Function: create-carbonite-producer

Arglists:
=========

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

Docstring:
==========

  Create a producer that uses carbonite for serialization.

   For more details about producers please see create-producer.
Back to top View Source

Function: create-consumer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-failsafe-json-consumer

Arglists:
=========

  (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)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-json-consumer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-json-lzf-consumer

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-json-lzf-producer

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-json-producer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-json-snappy-consumer

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-json-snappy-producer

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-mqtt-client

Arglists:
=========

  (create-mqtt-client broker-url)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: create-nippy-consumer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-nippy-lzf-consumer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-nippy-lzf-producer

Arglists:
=========

  (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)

Docstring:
==========

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

   For more details about producers please see create-producer.
Back to top View Source

Function: create-nippy-producer

Arglists:
=========

  (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)

Docstring:
==========

  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.
Back to top View Source

Function: create-pooled-consumer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-pooled-producer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-producer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-single-consumer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-single-producer

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: create-ws-stomp-session

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: fallback-serialization

Arglists:
=========

  (fallback-serialization data)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: get-adjusted-ssl-context

Arglists:
=========

  (get-adjusted-ssl-context)

Docstring:
==========

  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*
Back to top View Source

Function: get-destinations

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Function: map->ConsumerWrapper

Arglists:
=========

  (map->ConsumerWrapper m__7910__auto__)

Docstring:
==========

  Factory function for class bowerick.jms.ConsumerWrapper, taking a map of keywords to field values.
Back to top View Source

Function: map->ProducerWrapper

Arglists:
=========

  (map->ProducerWrapper m__7910__auto__)

Docstring:
==========

  Factory function for class bowerick.jms.ProducerWrapper, taking a map of keywords to field values.
Back to top View Source

Var: msg-prop-key

  No docs attached.
Back to top View Source

Function: remove-url-options

Arglists:
=========

  (remove-url-options url)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: send-error-msg

Arglists:
=========

  (send-error-msg producer msg)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: setup-broker-with-auth

Arglists:
=========

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

Docstring:
==========

  No docs attached.
Back to top View Source

Function: start-broker

Arglists:
=========

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

Docstring:
==========

  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" "/topic/test.topic.a", "write" "anonymous"}
Back to top View Source

Function: stop

Arglists:
=========

  (stop brkr)

Docstring:
==========

  No docs attached.
Back to top View Source

Function: to-json-bytes

Arglists:
=========

  (to-json-bytes data)

Docstring:
==========

  No docs attached.
Back to top View Source

Macro: with-destination

Arglists:
=========

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

Docstring:
==========

  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.
Back to top View Source

Var: ws-scheduler-id

  No docs attached.
Back to top View Source