camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Preben (JIRA)" <>
Subject [jira] [Commented] (CAMEL-3195) Allow camel to send custom xmpp Presence/PubSub packet to a xmpp endpoint
Date Sun, 22 May 2011 14:29:47 GMT


Preben commented on CAMEL-3195:

I have created a patch to the camel-xmpp component with a new XmppPubSubProducer and a XmppPubSubConsumer
Besides that there are 2 new properties 
node- and persistItems on the XmppEndpoint.
node is pubsub node where to publish or listen for events. The persistItems is used when resolving
the pubsub node. If it doesn't exist it will be created (true or false) to persistens.
Example :

Consumer can subscribe to node with anonymous login if supported by the xmpp server. Tested
on Ejabberd.

Requires Smackx 3.2.0 wich has been released.

There are 3 testcases as examples. 
Should be able to run even if they require online access - account is set up on jabber server.
The anonymous testcase will not run since the jabber server doesn't support anonymous login.

I'm not quite sure how it fits in with this ticket, but anyway i'm attaching a patch so you
can have a look.


> Allow camel to send custom xmpp Presence/PubSub packet to a xmpp endpoint
> -------------------------------------------------------------------------
>                 Key: CAMEL-3195
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-xmpp
>            Reporter: Chandra Prakash Joshi
>             Fix For: 2.8.0
>         Attachments: Camel-xmpp-pubsub-presence-v3.patch
> Claus Ibsen suggested that I should create a ticket for this new feature ([])
> I need to receive an update published to a JMS topic, convert it to a XMPP packet (Presence
packet or PubSub packet) and route it to an XMPP endpoint.
> I am using ActiveMQ as JMS provider and Apache camel as routing engine. given below is
my route in Camel (to make things simple I read from instead of a jms topic):
> {code:java} 
>      from("stream:in?promptMessage=Enter something:").process( new Processor(){
>         public void process(Exchange exchange) throws Exception {
>                 System.out.println("sending presence with message: " + exchange.getIn().getBody().toString());
>                 Presence p = new Presence(Type.available, exchange.getIn().getBody().toString(),
>                 exchange.getIn().setBody(p);
>             }
>             }).to("xmpp:user1@banl080161?password=pass1");
> {code}
> Idea is that user1@banl080161 should be able to send a custome presence packet having
status as given from I am reading from, making a presence packet, setting
this packet in the exchange body and send this presence on behalf of user1@banl080161.
> Problem: nothing gets sent to XMPP server, I use PSI to see packets coming from user1@banl080161,
user1@banl080161 comes online for sure but no custom presence message is received.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message