Note that there are some explanatory texts on larger screens.

plurals
  1. POApache Camel sends ActiveMQ messages to ActiveMQ.DLQ
    primarykey
    data
    text
    <p>There is a middleware in between of two other softwares. In the middleware I'm routing <code>Apache ActiveMQ</code> messages by <code>Apache Camel</code>. the first software uses middleware to send message to the 3rd software and the 3rd one reply the message to the first(using middleware).</p> <pre><code> 1stSoftware &lt;&lt;=&gt;&gt; Middleware &lt;&lt;=&gt;&gt; 3rdSoftware </code></pre> <p><strong>Problem:</strong></p> <p>when with the first one I send message to the middleware, middleware sends that message directly to <code>ActiveMQ.DLQ</code> and the 3rd one can not consume it!(Interesting point is this: when I copy that message to the main queue with the <code>Admin panel of ActiveMQ</code>, software can consume it properly!)</p> <p><strong>What's the problem?! It was working until I changed the Linux date!!!!!!!</strong></p> <p>Middleware is like this:</p> <pre><code>@SuppressWarnings("deprecation") public class MiddlewareDaemon { private Main main; public static void main(String[] args) throws Exception { MiddlewareDaemon middlewareDaemon = new MiddlewareDaemon(); middlewareDaemon.boot(); } public void boot() throws Exception { main = new Main(); main.enableHangupSupport(); //?wireFormat.maxInactivityDuration=0 main.bind("activemq", activeMQComponent("tcp://localhost:61616")); //ToGet main.bind("activemq2", activeMQComponent("tcp://192.168.10.103:61616")); //ToInOut main.addRouteBuilder(new MyRouteBuilder()); System.out.println("Starting Camel(MiddlewareDaemon). Use ctrl + c to terminate the JVM.\n"); main.run(); } private static class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { intercept().to("log:Midlleware?level=INFO&amp;showHeaders=true&amp;showException=true&amp;showCaughtException=true&amp;showStackTrace=true"); from("activemq:queue:Q.Midlleware") .process(new Processor() { public void process(Exchange exchange) { Map&lt;String, Object&gt; header = null; try { Message in = exchange.getIn(); header = in.getHeaders(); } catch (Exception e) { log.error("Exception:", e); header.put("Midlleware_Exception", e.getMessage() + " - " + e); } } }) .inOut("activemq2:queue:Q.Comp2") } } } </code></pre> <p>And the 3rd software(Replier): (this is a daemon like above, i just copied the <code>RouteBuilder</code> part)</p> <pre><code>private static class MyRouteBuilder extends RouteBuilder { @Override public void configure() { intercept().to("log:Comp2?level=INFO&amp;showHeaders=true&amp;showException=true&amp;showCaughtException=true&amp;showStackTrace=true"); from("activemq:queue:Q.Comp2") .process(new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); Map&lt;String, Object&gt; headers = null; try { headers = in.getHeaders(); in.setBody(ZipUtil.compress(/*somResults*/)); } catch (Exception e) { log.error("Exception", e); in.setBody(ZipUtil.compress("[]")); in.getHeaders().put("Comp2_Exception", e.getMessage() + " - " + e); } } }) ; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload