On Wed, Feb 21, 2018 at 4:54 AM, Rajesh Malla <mallara...@gmail.com> wrote:
> Hello > > we migrated activemq from < 5.5 version to 5.12.3. below is code snippet > for > to create n/w connector > > NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri); > networkConnector.addDynamicallyIncludedDestination(...) > networkConnector.addExcludedDestination(...) > > we are using Camel request/reply pattern with tempQueue. so our n/w > connector working only when we are removing => > networkConnector.addDynamicallyIncludedDestination(...) > Is there any reason that you can't just do that? It's simple and you say it works correctly for you... > so either we need to remove or we need to provide this for TempQueue also. > TempQueue is starting with ID_ > so, what pattern I need to give ? I tried different patterns like below > > ID.> > ID> > ID.* > ID* > > but none of these above are working. ActiveMQ wildcards only apply to one or more names in a path, but cannot be used to specify variable content within a single name, so you can't match "ID_SOMERANDOMNUMBER" with any of the patterns you mentioned, unless you use a plugin to specify "_" instead of "." as the custom path separator for name hierarchies. See http://activemq.apache.org/wildcards.html for examples of what does work and details about the custom plugin. > we need exact pattern to specify for > addDynamicallyIncludedDestination for tmpQueue also then only we will get > response otherwise we need to remove this addDynamicallyIncludedDestinat > ion. > > so please suggest pattern & do we need to add it as new > ActiveMQTempQueue("ID PATTERN") or > new ActiveMQQueue("ID PATTERN") ? bcz if we add ActiveMQTempQueue I am > thinking this will not consider in n/w bridge. > If I'm reading the code of DemandForwardingBridgeSupport.startRemoteBridge() correctly, you don't need to explicitly include temp destinations, you just need to ensure that NetworkBridgeConfiguration.isBridgeTempDestinations() is true (the default value). So if not calling addDynamicallyIncludedDestination() causes things to work, that seems like the right solution for you to use. Tim