Murtaza:
On Jul 6, 2012, at 7:01 AM, Murtaza Husain wrote:
> Three requests -
> (msg/respond "/queue/work" (partial apply *) :selector "operation='multiply'")
> 1) Can the topic and queue be expressed as :queue/work or :topic/work, like
> datomic style ?
That would be trivial to implement. Can you file a JIRA[1] and we'll consider
it?
>
> 2) Can the message {"operation" "multiply"} be a map with {:operation
> "multiply"} ?
I'm going to assume you are referring to the :properties map here and not the
message itself, since your map matches the example from the docs. We do accept
keywords as property names, but don't do so in the examples since it could lead
to confusion. The properties are mapped directly onto javax.jms.Message
properties[2], which must be identified by strings, and the strings must start
with a letter or number. We convert :foo to "foo" via (name), which then makes
writing a correct selector potentially confusing since an easy assumption would
be that ":foo='bar'" would work.
>
> 3) Can we have a predicate function in place of jms pattern selector, #(=
> multiply (:operation %)) instead of "operation='multiply'"
The selector is a JMS selector[2] which we pass along to the JMS broker without
modification. JMS doesn't provide a mechanism for us to pass a dynamic
selector, only a string. So if we wanted to support a clojure based selector,
it would really be a DSL that emitted a static selector string. That's not
something I want to take on, but if you have a strong desire to have it patches
are always welcome :)
Since we're discussing Immutant implementation details, I've set the reply-to
to immutant-user@ to move the discussion there (if google groups doesn't
replace that header, which it most likely will).
- Toby
[1]: https://issues.jboss.org/browse/IMMUTANT
[2]: http://docs.oracle.com/javaee/6/api/javax/jms/Message.html
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en