spring-integration is losing headers when sent to a subscriber -


i using spring-integration hornetq. problem have put custom header in message (method), when hits subscriber header no longer available. there sort of configuration property need setup preserve headers?

an application receives message (i can see method header in console log know getting correct message). routes message onto outbound queue client can subscribe (if there cleaner way please let me know)

<int:channel id="partschannel" />  <int-jms:message-driven-channel-adapter     id="jmspartsinbound"     acknowledge="transacted"     destination-name="parts.in"     channel="partschannel"     connection-factory="jmsconnectionfactory"     /> <!-- error-channel="partsinboundfailedchannel" -->  <int-jms:outbound-channel-adapter     id="jmspartsoutbound"     destination-name="parts.out"     channel="partschannel"     connection-factory="jmsconnectionfactory"     pub-sub-domain="true"     >     <int-jms:request-handler-advice-chain>         <int:retry-advice max-attempts="3">             <int:exponential-back-off initial="2000" multiplier="2" />         </int:retry-advice>     </int-jms:request-handler-advice-chain> </int-jms:outbound-channel-adapter> 

applications subscribe so:

   <int:channel id="partsinboundchannel" />     <int-jms:message-driven-channel-adapter       id="jmspartsinbound"       acknowledge="transacted"       destination-name="parts.out"       channel="partsinboundchannel"       pub-sub-domain="true"       connection-factory="jmsconnectionfactory"/>  

and part gets message in subscriber.

@serviceactivator(inputchannel = "partsinboundchannel") public void processpart(final message message) {    ...message.getheaders not contain "method" header  } 

isn't issue here in defaultjmsheadermapper.fromheaders:

if (value != null && supported_property_types.contains(value.getclass())) {                     try {                         string propertyname = this.fromheadername(headername);                         jmsmessage.setobjectproperty(propertyname, value);                     } 

where supported_property_typesare:

private static list<class<?>> supported_property_types = arrays.aslist(new class<?>[] {         boolean.class, byte.class, double.class, float.class, integer.class, long.class, short.class, string.class }); 

so, if method of method type, skipped.

consider use name instead.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -