Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-9985

Route irc->irc cycles the message because of "irc.target" header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.6-DR1
    • fuse-7.2
    • Camel
    • None

      Using this route (sending private message to "priv" user that should be sent to channel "test2" via "chan" user):

      from("irc://priv@localhost:6667/test1")
      .log("${headers}")
      .to("irc://chan@localhost:6667/test2");
      

      The user "chan" never sends the message to the channel and instead of that the message cycles between the two users:

      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-1, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=avano, irc.user.servername=avano, irc.user.username=avano}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-1]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=avano msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-2, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-2]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-3, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-3]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-4, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-4]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-5, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-5]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-6, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-6]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-7, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-7]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-8, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-8]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-9, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-9]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-10, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-10]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-11, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-11]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      [                      Thread-3] route1                         INFO  {breadcrumbId=ID-fakefrog-1546849878466-0-12, irc.messageType=PRIVMSG, irc.target=priv, irc.user.host=172.17.0.1, irc.user.nick=chan, irc.user.servername=chan, irc.user.username=chan}
      [                      Thread-3] SendProcessor                  DEBUG >>>> irc://chan@localhost:6667?channel=test2 Exchange[ID-fakefrog-1546849878466-0-12]
      [                      Thread-3] IrcProducer                    DEBUG Sending to: priv message: hi
      [                      Thread-3] IrcComponent                   DEBUG Server: localhost - onPrivmsg target=priv user=chan msg="hi"
      ^C[ad #0 - CamelHangupInterceptor] MainSupport$HangupInterceptor  INFO  Received hang up - stopping the main instance.
      [       com.text.MainApp.main()] MainSupport                    INFO  MainSupport exiting code: 0
      [ad #0 - CamelHangupInterceptor] DefaultCamelContext            INFO  Apache Camel 2.21.0.fuse-720029 (CamelContext: camel-1) is shutting down
      [ad #0 - CamelHangupInterceptor] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 300 seconds)
      

      For some reason, the irc.target header in the in exchange of "chan" user is set back to "priv" user, probably because of populateInitialHeaders

      This is the related part of the code - here I would expect that the "chan" user ignores the irc.target and will send the messages to all channels I configured on that endpoint

            jondruse@redhat.com Jiri Ondrusek
            avano@redhat.com Andrej Vano
            Andrej Vano Andrej Vano
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: