You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mond Ray Mond <op...@gmail.com> on 2010/03/26 17:08:49 UTC

Writing a fire and forget client - how to set outbound JMS headers?

I am trying to write a client to send a one way message and, if I get your
docs, I think is the right way:

public interface FireAndForget {
    void fire(String message);
}

public class FireAndForgetCamel implements FireAndForget {
    @Produce(uri = "activemq:tqsBridge")
    protected FireAndForget producer;

    static final String applicationId = "foo";
    static final String groupId = "bar";

    @InOnly
    public void fire(String destinationId) {

        producer.fire(applicationId + groupId + destinationId);

    }

}

The trouble is I would like to add the applicationId to the message header
rather than the message header.  How can I do that?  Do I need some
different client-side tech to interact with JMS more, ahem, intimately?

Thanks

Ray
-- 
View this message in context: http://old.nabble.com/Writing-a-fire-and-forget-client---how-to-set-outbound-JMS-headers--tp28044660p28044660.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Writing a fire and forget client - how to set outbound JMS headers?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I actually do not think this is possible with the Camel proxy.
I wonder if we should allow you to use Map or some convention of
configuration to pass in headers as well.

Fell free to create a JIRA ticket and if possible attach an unit test
we can use to get quicker up to speed to find some new improvements to
allow this.



On Fri, Mar 26, 2010 at 6:08 PM, Mond Ray Mond <op...@gmail.com> wrote:
>
> I am trying to write a client to send a one way message and, if I get your
> docs, I think is the right way:
>
> public interface FireAndForget {
>    void fire(String message);
> }
>
> public class FireAndForgetCamel implements FireAndForget {
>    @Produce(uri = "activemq:tqsBridge")
>    protected FireAndForget producer;
>
>    static final String applicationId = "foo";
>    static final String groupId = "bar";
>
>    @InOnly
>    public void fire(String destinationId) {
>
>        producer.fire(applicationId + groupId + destinationId);
>
>    }
>
> }
>
> The trouble is I would like to add the applicationId to the message header
> rather than the message header.  How can I do that?  Do I need some
> different client-side tech to interact with JMS more, ahem, intimately?
>
> Thanks
>
> Ray
> --
> View this message in context: http://old.nabble.com/Writing-a-fire-and-forget-client---how-to-set-outbound-JMS-headers--tp28044660p28044660.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus