JMS queue dynamic configuration

I am trying to make a scenario, where we need to send a message to 4 different mq queues depending on a field value in the message.
I am using the adapter specific parameter DCJMSReplyTo - the value of this parameter is set in a user defined function during message mapping.
The receiver adaptor has following configuration:
Use adapter specific message attributes X
Additional parameters: JMS.Message.DynamicDestination = true
JMS compliant: WebSphereMQ (non-JMS)
I am using WebSphere MQ
The routing of messages is working well - only problem is, that a MQRFH2 header is created and printed as a part of the message delivered to MQ.
Is there any way to avoid this?

I thought your MQ JMS CC must be JMS compliant, which means the MQRFH2 header must be present in the message. Please check
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/faq%252b%252bj2ee%252bjms%252badapter

Similar Messages

  • IDOC to JMS with Dynamic Configuration.

    Dear Experts,
    IDOC -> SAP PI -> JMS.
    We will receive a value in the IDOC-message, based on which the target queue is to be defined.
    1) So which property in Dynamic Configuration will help me?
    2) Will it be the normal procedure (UDF in Message Mapping and then select the ASMA attribute in receiver channel)?
    I went through: http://wiki.sdn.sap.com/wiki/display/XI/FAQ+J2EEJMS+Adapter (question 2.9 and 2.8)
    But in one thread it was mentioned that such configuration (of queue) is not possible.
    Any idea on how to proceed?
    ~Thanks.

    Hello Stefan,
    Thank you for the response.
                        -----> Company1
    IDOC -> SAP PI   -----> Company2
                        -----> Company3
    We have the above integration in place. Now without ASMA, we will have to create three different JMS Channels; one in each of the Business Service. This would mean that in future if the receivers increase, the corresponding channels have to be increased
    But now I am confused as to what the Q 2.9 in this wiki link means: http://wiki.sdn.sap.com/wiki/display/XI/FAQ+J2EEJMS+Adapter
    ~Thanks

  • Jms queue problem in 11g

    exception trace is comming, while running the project in weblogic, in the project iam using jms queue, i configured the jms server and jms module and connection factory but it is showing these exception
    [The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: InvalidSecurity : error in processing the WS-Security security header]
    can any one please, provide the suggestions

    i got the solution for my problem, i just need to add owsm policies to my processs

  • Posting a message to JMS queue using B2B

    Hi,
    Could anyone suggest a solution for this scenario?
    I have two trading partners say TP1 & TP2. Suppose TP1 is sending an xml message to TP2 using custom ebMS protocol, then at TP2, the message should be posted to a JMS Queue so that some other application can read it and process it.
    The problem which I am facing is..
    1) where to create that JMS Queue(I could not find any options for creating a JMS Queue neither in B2B console nor in enterprise manager console..!!)?
    2) how to register TP2 to send msg to that JMS Queue(How that queue will be vissible to B2B)?
    3) Should the endpoint be given as that JMS Queue while configuring the Delivery Channel for TP2?
    Thanx in advance for your suggestions,
    Regards,
    Satya.

    Hi Narayanan,
    Thank you for your prompt reply. I understand that we need to create an external delivery channel to post the message to a JMS Queue from TP2. Currently I am using default AQ's (b2b.IP_IN_QUEUE & b2b.IP_OUT_QUEUE) at TP2 end to receive the message.
    But, I want to post the message to JMS Queue. For this I need to create an external delivery channel and the corresponding end point should be the name of that JMS Queue. Is my assumption correct?
    I have already gone through the thread that you have mentioned and the pdf as well. But, I am not able to find an option on how & where to create that JMS Queue?
    Could you clarify on this?
    Regards,
    Satya.

  • Dynamic Configuration JMS

    Hi,
    i am trying to use dynamic configuration variable DCJMSMessageQueue as a condition for determining the receiver within the Receiver Determiniation. I can see the value in the DCJMSMessageQueue, but the condition is not applied.
    Have anyone tried to use this variable within the Receiver Determination (SP14)?
    Thnx in advance.
    Regards, Erik Hubers

    Hi Erik,
    I'm using JMS Channels and Adapter-specific attributes quite a lot (in my case it's DCJMSCorrelationID).
    So far I never had the requirement to use it in conditions in a Receiver Determination, but I set up
    a Receiver Determination to test it and it worked with SP15.
    Now what was a little strange is that the expression only worked if I set it up in the following way:
    DCJMSMessageQueue = queue:///EVENT_EB5331?targetClient=1
    where my queue name is solely EVENT_EB5331 (I'm using WebSphere MQ in native mode).
    Maybe that solves your problem (I actually copied this value, because it is the way it is written in the DynamicConfiguration
    piece of the XI message).
    There is another issue I had with the JMS Adapter Specific Attributes in SP14.
    The namespace of the attributes was implemented wrong (at least the one for DCJMSCorreleationID). Instead of
    'http://sap.com/xi/XI/System/JMS'
    it was just 'JMS'.
    Now if the condition is - by any reason - evaluated against the correct namespace (the long one)
    this could also be a reason why it is not working.
    Check the values in the DynamicConfiguration and have a look at the Trace.
    You should find something like this in the R E C E I V E R  D E T E R M I N A T I O N part of it:
    <Trace level="3" type="T">...call rule engine for Condition %CL_SAI_SWF_RULE_ENGINE.MSG_GET_SYSTEM
    (MSG=&_MSG&;SYSFIELD="DCJMSMessageQueue";
    SYSNSP="http://sap.com/xi/XI/System/JMS")% = queue:///EVENT_EB5331?targetClient=1</Trace>
      <Trace level="2" type="T">......attachment XI_Context not found</Trace>
      <Trace level="3" type="T">......extracting from attachment: DCJMSMessageQueue =
    queue:///EVENT_EB5331?targetClient=1</Trace>
      <Trace level="2" type="T">......extracting values found: 1</Trace>
    Compare the namespaces there with the one in the DynamicConfiguration.
    If there is a mismatch upgrade to SP15 or open an OSS Message.
    I hope that helps...
    regards,
    Peter

  • OSB - Dynamic JMS Queue Routing

    My Input to the proxy is
    a. A Message payload.
    b. QueueName ( queueA or QueueB or can be anything else).
    The message has to be sent to QueueName( a JMS queue setup in weblogic) configured in the input.
    How do i do this in OSB ?
    In bpel i simply used <bpelx:inputProperty name="jca.jms.JMSDestinationName" to dynamically assign the JMSDestination name to any queue.

    Your endpoint should look like similar to:
    jms://myosbmanaged_server:7001/my_jndi_connection_factory/my_jndi_queue_name
    i.e (for a distributed queue over and osb cluster)
    jms://osb1dev2:7001,osb2dev2:7001/weblogic.jms.XAConnectionFactory/Finance.ExchangeRates.Queue
    HTH

  • How to configure my JMS QUEUE serve only one message at a time?

    Hi All,
    I have requirement where I need to develope a JMS QUEUE in weblogic. This MDB has to serve only one message at a time. Is there any way to configure via annotations or in weblogic server settings ?
    Any help would be really appreciated...
    Thank you,
    K.

    I'm not aware of any way to configure the max pool size via annotations, you might try posting to the EJB newsgroup (please post back the answer). Of course you can set the size via an EJB descriptor, as per the MDB chapter of the Performance and Tuning guide in the edocs.
    By the way, if you have ordered message processing requirements, I highly recommend taking a look at the WebLogic JMS "Unit-of-Order" (UOO) feature as per the UOO chapter of the JMS programmer's guide. For a variety of reasons, the UOO features is often, by far, the best option for handling such requirements. If this feature applies to your use case, then there would be no need to force single threaded message processing in some sort of manual fashion (the feature enforces this for you).
    Tom

  • How to configure a JMS Queue

    Hi,
    I have an EAR file thai includes an EJB 3.0 module with a MDB. I use a Queue.
    This is my code,
    @Resource(mappedName = "jms/NotificationQueue")
    private Queue notificationQueue;
    @Resource(mappedName = "jms/NotificationQueueFactory")
    private ConnectionFactory notificationQueueFactory;
    public Customer update(Customer customer){
    Customer updated = em.merge(customer);
    try {
    sendJMSMessageToNotificationQueue(updated);
    } catch (JMSException ex) {
    Logger.getLogger(CustomerSessionBean.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Customer updated in CustomerSessionBean!");
    return updated;
    private Message createJMSMessageForjmsNotificationQueue(Session session, Object messageData) throws JMSException
    //Modified to use ObjectMessage instead
    ObjectMessage tm = session.createObjectMessage();
    tm.setObject((Serializable) messageData);
    return tm;
    private void sendJMSMessageToNotificationQueue(Object messageData) throws JMSException
    Connection connection = null;
    Session session = null;
    try
    connection = notificationQueueFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(notificationQueue);
    messageProducer.send(createJMSMessageForjmsNotificationQueue(session, messageData));
    finally
    if (session != null)
    try
    session.close();
    catch (JMSException e)
    Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot close session", e);
    if (connection != null)
    connection.close();
    layed inside a stateless EJB 3.0.
    And the MDB looks as follow,
    @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class NotificationBean implements MessageListener {
    public NotificationBean() {
    public void onMessage(Message message)
    try
    Object msgObj = ((ObjectMessage)message).getObject();
    if (msgObj != null)
    Customer customer = (Customer)msgObj;
    System.out.println("Customer with the following details has been updated:");
    StringBuilder sb = new StringBuilder();
    sb.append("Customer ID=");
    sb.append(customer.getCustomerId());
    sb.append(", ");
    sb.append("Name=");
    sb.append(customer.getName());
    sb.append(", ");
    sb.append("Email=");
    sb.append(customer.getEmail());
    System.out.println(sb.toString());
    catch (JMSException ex)
    Logger.getLogger(NotificationBean.class.getName()).log(Level.SEVERE, null, ex);
    I have configured both "jms/NotificationQueue" and "jms/NotificationQueueFactory" inside OC4J server.
    But when I try to deploy the EAR file, the server gives me the following error,
    Operation failed with error: No destination location set for message-driven bean NotificationBean
    How must I do to let the EAR file be deployed?
    Thanks in advance
    Jose

    Mingzhuang
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
    Let me know if we are not on same page.
    Cheers
    Manoj

  • How to configure JMS queue on OC4J server. Development in JDeveloper 10G

    Hi there,
    I have to configure a JMS for an Asynchronous process in my Application which will be running in Oracle 10G Application Server. Development Environment is Oracle JDeveloper 10G.
    I am facing a problem on how to configure JMS queue.
    Steps Followed are:
    in the <JDevloperHome>/j2ee/home/config
    1. Made the new queue and connection factory's JMS entry in jms.xml.
    2. Specifed the queue in oc4j-connectors.xml.
    3. played around with application.xml
    and tried all combinations, but the message producer always failed to lookup the queue.
    Need help on the steps to follow so that the producer can post the message in the queue.
    Also please help how to configure the MDB to listen to the queue.
    Thanx and Regards
    Subham

    If you were dealing with Oracle 10g app server as opposed to standalone, I might be better able to help you.
    One thing though, when you are configuring your MDB in the orion-ejb-jar.xml file, do not forget to specify attribute listener-threads, otherwise no matter how many beans you have in your MDB pool, only one bean will be listening to the queue. Many listener-threads equal to max number of beans in pool.

  • Dynamic configuration bean in JMS Adapter

    Hello Experts,
    My scenario is JMS(Active MQ) to File.Its just Passthrough scenario and no mapping involved.
    Filename will be coming in one of the JMS Property (say businessId) and I need to set this filename to file adapter.
    I have refered the stefan's blog and used the Dynamic configuration bean module in sender JMS adapter.
    getFilename key.1 write http://sap.com/xi/System/JMS DCJMSMessageProperty4
    getFilename value.1 module.filename
    setFilename key.1 read http://sap.com/xi/System/File FileName
    setFilename value.1 module.filename
    But required filename is not populated in the target File.Any other configuration is missing here?

    Hi Karthiga
    Did you set the ASMA properties in both your sender JMS channel and receiver File channel?
    For the JMS adapter, as shown below, you will need to enter the DCJMSMessageProperty4 into the table
    Configuring the Sender JMS Adapter - Configuring the JMS Adapter in the Integration Directory/PCK - SAP Library
    If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).
    In the table, enter the names of the JMS message properties whose values are to be included in the message header of the PI message.
    The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
    For the File adapter, you need to check the ASMA FileName attribute.
    Once you have this configured, in your message, you should be able to see that the value is in the DynamicConfiguration section of the SOAP header.
    Rgds
    Eng Swee

  • Dynamic configuration in Sync/Async bridge in JMS

    Hi
    Scenario:
    Portal sending request to JMS MQ and getting Response using sync/Async Bridge.
    I have to written a UDF which will capture the value for cust_uid from request mapping and store it in dynamic configuration
    And when the response comes from JMS MQu2026.this value gets populated in response mapping.
    I have tested the UDF in a dummy Soap2rfc scenario and its working fine.
    But when used in Sync/Async Bridge, the dynamic configuration  fails.
    For Sync/Async Bridge, there are 2 channels 1) Sender JMS 2) receiver JMS.
    The synchronous request is converted to an asynchronous request in the module processor and sent.
    The asynchronous system sends a response to a sender adapter. In the module processor of the sender adapter, this response is forwarded to the module processor of the original receiver adapter, where it is sent as a synchronous response of the waiting synchronous request.
    Please  suggest
    Regards
    Abhijit

    Hi Abhijit,
    Okay, so your data extraction/insertion is working fine for a simple synchronous request responser call.
    I suppose this is working fine because your receiver adapter copies some part of the request message (at least the dc header) to the response message. (But I don't think this always works for all the adapter types). It is not working for the sync-async bridge because there are two unrelated messages in this case.
    In order to copy the dc header from the first message to the second message, I think you can use the DynamicConfiguraitionBean module to store the dc header value in the module data and use this module again to recover it and set it to the second message. The whole process is somewhat complicated, but I will sketch the approach below.
    First, let's call the first use of DCB the store step and the second the recover step. These store and recover steps must take place in the same module sequence so that they can use the module data to pass data from the first message to the second message. Furthermore, the store step must occur after the cust_id value is extracted into the dc header. So, your configuration must be placed in the receiver adapter side. Assuming the request message with the filled dc header coming into the module sequence, the first DCB module can be placed before the ROB module to store the dc header value in the module data. And the second DCB module can be placed after the WRB module to recover the dc header value from the module data and set it the dc header of the response message.
    I hope this will work.
    Regards, Yza

  • Calling proxy  according to jms attribute in Dynamic Configuration

    Hello,
    I have jms to proxy integration. I defined  additional jms parameters in Adapter -Specific Message Attribute in JMS senderadapter. And I can retrieve this field in dynamics configuration in SXMB_MONI. Process should be continued as such:
    If  "DCJMSMessageProperty0" is 1, proxy should be called for invoice,
    If  "DCJMSMessageProperty0" is 2, proxy should be called for  Claims.
    How can i do it?
    Please help
    Thanks for your help
    Nurhan

    Thanks  for your reply, but i think so that i misstold. I mean that i have one jms queue in  ibm websphere mq. In this queue exist multiple messsage format. I defined a addtional  jms message attribut in jms sender adapters  in PI. I have two jms sender adapters.
    According to this additional jms message properties should be called different proxy:
    If "DCJMSMessageProperty0" is 1, proxy should be called for invoice,
    If "DCJMSMessageProperty0" is 2, proxy should be called for Claims.
    Also this configuration should be done in jms sender adapter.
    Thanks in Advance
    Nurhan

  • Dynamic queue name with JMS Queue XML?

    Hi,
    Is it possible to use dynamic queue name with JMS Queue XML?
    I tried using a variable in the JNDI URL, and supply the value in a package. I specified the following in the JNDI URL in the Topology:
    e.g.
    <JMS_RESOURCE>?d=<DTD_FILE>&s=<SCHEMA>&JMS_DESTINATION=#PROJECT_NAME.dest_var
    I declared and set the variable in a package, then tried to load data from the above data server to database. But executing this package gave me the following error:
    7000 : null : java.sql.SQLException: javax.jms.JMSException: Cannot find the target in JNDI (#PROJECT_NAME.dest_var)
    java.sql.SQLException: javax.jms.JMSException: Cannot find the target in JNDI (#PROJECT_NAME.dest_var)
         at com.sunopsis.jdbc.driver.bg.executeQuery(bg.java)
         at com.sunopsis.jdbc.driver.bh.executeQuery(bh.java)
         at com.sunopsis.jdbc.driver.l.f(l.java)
         at com.sunopsis.jdbc.driver.l.executeUpdate(l.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Am I doing it wrongly?
    Thanks!

    hi,
    as it's not in Adapter-Specific Message Properties
    http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    looks like you cannot do it with jms adapter in standard
    use proxy or your own adapter instead
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to remove messages from JMS Queue?how to configure queue in spring?

    Hi
    I have Confiured a JMS configaration in spring applicationConfiguaration.xml file
    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    <property name="useAsyncSend" value="true"/>
    </bean>
    <bean id="queue" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="foo"/>
    </bean>
    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config" value="classpath:activemq.xml" />
    <property name="start" value="true" />
    <!-- <property name="messageListener" ref="auditInterface"/> -->
    </bean>
    <bean id="auditInterface"
    class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean">
    <property name="serviceInterface" value="com.infiniti.gpn.auditing.AuditInterface"/>
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="queue" ref="queue"/>
    </bean>
    <bean id="listenerContainer" class="org.springframework.jms.listener.SimpleMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="queue"/>
    <property name="messageListener" ref="auditMessageListener"/>
    </bean>
    Sender is sedning messages continusly messages that messages r storing in queue , these r acupying more memory in RAM , due to that jboss is restarting for each request, is there any way to clean up messages in Queue ? if it is there then how will configure that queue in apllicationConfiguaration.xml file?
    Thanks in advance
    Nara

    Hi,
    Even i have a similar kind of requirement where in, i want to clear the JMS Queue Message programmatically, on certain condition.
    i am using Spring JMS. The JMS Queue has a listener. In the listener we want to clear the Queue contents based upon the condition.
    If anybody has any idea about this, please reply back.
    Thanks in Advance.
    Manjunath.

  • How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    If you want to use JMS with AQ as datastore then there is some configuration you need to do to enable this. This is outside SOA Suite per sa, e.g. no adapter required.
    If you want to connect to the AQ direct then use the AQ adapter.
    this blog may be of some help understand the configuration
    http://biemond.blogspot.com/2008/01/oracle-jms-with-esb-and-bpel.html
    cheers
    James

Maybe you are looking for