Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-3195

Allow camel to send custom xmpp Presence/PubSub packet to a xmpp endpoint

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.15.0
    • camel-xmpp
    • None

    Description

      Claus Ibsen suggested that I should create a ticket for this new feature (http://stackoverflow.com/questions/3645159/can-apache-camel-send-a-xmpp-presence-pubsub-packet-to-an-xmpp-endpoint)

      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 system.in instead of a jms topic):

       
           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(), 5, Mode.chat);
                      exchange.getIn().setBody(p);
                  }
                  }).to("xmpp:user1@banl080161?password=pass1");
      

      Idea is that user1@banl080161 should be able to send a custome presence packet having status as given from system.in. I am reading from system.in, 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.

      Attachments

        1. camel-xmpp.patch
          25 kB
          Preben Asmussen
        2. Camel-xmpp-pubsub-presence-v3.patch
          23 kB
          Chandra Prakash Joshi
        3. pubsub-xmpp.patch
          18 kB
          Hugo Freire

        Activity

          People

            davsclaus Claus Ibsen
            chandraprakashjoshi Chandra Prakash Joshi
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: