Skip to content

Commit

Permalink
Doc :concurrency and bump wboss dep for #cores default [IMMUTANT-360]
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrossley3 committed Apr 7, 2015
1 parent 7359f4c commit 3b08db7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions docs/guides/messaging.md
Expand Up @@ -148,6 +148,16 @@ dereference:
The responder is just a fancy listener, and can be deregistered the
same way as a listener.

## Concurrency

Listeners can have multiple threads invoking their handler as messages
are consumed. You control how many with the `:concurrency` option
provided by [[listen]] and [[respond]]. By default, it is set to 1 for
topics and the number of available processors for queues, but for
IO-bound handlers, you may see better performance as you increase the
number. It very much depends on what your handler is doing and how
many messages it needs to process concurrently.

## Durable Topic Subscriptions

Typically, messages published to a topic are only delivered to
Expand Down
2 changes: 1 addition & 1 deletion messaging/src/immutant/messaging.clj
Expand Up @@ -227,7 +227,7 @@
The following options are supported [default]:
* :concurrency - the number of threads handling messages [1]
* :concurrency - the number of threads handling messages [1 for topics, #cores for queues]
* :selector - A JMS (SQL 92) expression matching message metadata/properties [nil]
* :decode? - if true, the decoded message body is passed to `f`. Otherwise, the
base message object is passed [true]
Expand Down
4 changes: 2 additions & 2 deletions messaging/src/immutant/messaging/pipeline.clj
Expand Up @@ -258,7 +258,7 @@
* :name a name to use for the step [the current index of the fn]
* :concurrency the number of threads to use, overriding the pipeline
setting [1]
setting [#cores]
* :decode? if false, the raw message object will be passed to
this step [true]
* :error-handler an error handler function that can override the
Expand Down Expand Up @@ -301,7 +301,7 @@
* :concurrency the number of threads to use for *each* step. Can be
overridden on a per-step basis - see the 'step'
function. [1]
function. [#cores]
* :error-handler a function that will be called when any step raises
an exception. It will be passed the exception and
the argument to the step. Without an error-handler,
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Expand Up @@ -91,7 +91,7 @@
clj-http "1.0.1"

;; org.projectodd.wunderboss "0.4.1"
org.projectodd.wunderboss "1.x.incremental.220"
org.projectodd.wunderboss "1.x.incremental.224"
;; org.projectodd.wunderboss "0.5.1-SNAPSHOT"

org.immutant :version
Expand Down

0 comments on commit 3b08db7

Please sign in to comment.