Skip to content

Commit

Permalink
Use WBoss that throws when a non-remote context is given to listen, q…
Browse files Browse the repository at this point in the history
…ueue, or topic [IMMUTANT-500]
  • Loading branch information
tobias committed Oct 21, 2014
1 parent 4ec681d commit 7bed7c2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
36 changes: 21 additions & 15 deletions messaging/src/immutant/messaging.clj
Expand Up @@ -87,17 +87,17 @@
(defn queue
"Establishes a handle to a messaging queue.
The following options are supported [default]:
If given a :context, the context must be remote, and is remembered and
used as a default option to any fn that takes a queue and a context.
* :context - a context to a remote broker [nil]
* :durable? - whether messages persist across restarts [true]
* :selector - a JMS (SQL 92) expression to filter published messages [nil]
This creates the queue if no :context is provided and it does not
yet exist.
If given a :context, the context is remembered and used as a
default option to any fn that takes a queue and a context.
The following options are supported [default]:
This creates the queue if no :context is provided and it does not
yet exist."
* :context - a context for a *remote* broker [nil]
* :durable? - whether messages persist across restarts [true]
* :selector - a JMS (SQL 92) expression to filter published messages [nil]"
[queue-name & options]
(let [options (-> options
u/kwargs-or-map->map
Expand All @@ -113,15 +113,16 @@
(defn topic
"Establishes a handle to a messaging topic.
The following options are supported [default]:
If given a :context, the context must be remote, and the context is
remembered and used as a default option to any fn that takes a topic
and a context.
* :context - a context to a remote broker [nil]
This creates the topic if no :context is provided and it does not
yet exist.
If given a :context, the context is remembered and used as a
default option to any fn that takes a topic and a context.
The following options are supported [default]:
This creates the topic if no :context is provided and it does not
yet exist."
* :context - a context for a *remote* broker [nil]"
[topic-name & options]
(let [options (-> options
u/kwargs-or-map->map
Expand Down Expand Up @@ -211,13 +212,18 @@
If a :selector is provided, then only messages having
metadata/properties matching that expression will be received.
If given a :context, the context must be remote, and the mode of that
context is ignored, since it is used solely to generate sub-contexts
for each listener thread. Closing the given context will also close
the listener.
The following options are supported [default]:
* :concurrency - the number of threads handling messages [1]
* :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]
* :context - a remote context to use; caller expected to close [nil]
* :context - a context for a *remote* broker; caller expected to close [nil]
* :mode - the mode to use for the listener context. One of :auto-ack, :client-ack,
:transacted [:transacted]
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Expand Up @@ -84,7 +84,7 @@
org.clojure/java.jdbc "0.3.5"

;; org.projectodd.wunderboss "0.1.0"
org.projectodd.wunderboss "1.x.incremental.157"
org.projectodd.wunderboss "1.x.incremental.159"
;; org.projectodd.wunderboss "0.2.0-SNAPSHOT"

org.immutant :version}}
Expand Down

0 comments on commit 7bed7c2

Please sign in to comment.