Creating synchronous publisher with JMS

I wonder, if it's possible to "synchronously publish" the messages with JMS pub/sub model. "Synchronously publish" - that is to say, when a message has been published (publish() method invoked with the message), the thread waits until the message is successfully consumed by all the registered subscribers (i.e. is acknowledged).
In other words, I would like to be sure that the message has been consumed successfully before I send the next message.
Thanks.

Thank you once more for your time and explanations.
Probably, I might want to use not a JMS-based system, but rather an event system, similar to Spring events framework, because I'm interested rather in a solid-made thread-safe message dispatcher library (not necessarily across network - inside one process would be enough), than in a separate message broker service.
As for "hardly acceptable" - indeed, I don't want any of my classes to be tightly bound to any broker-specific logic, one of which is the necessity to notify the message sender about the fact that the message had been consumed.
For example, when using any simple event-system, similar to what AWT presents, a MessageListener implementation is only limited by the obligation to implement one-method interface (kind of actionPerformed, mouseClicked - generally saying - eventOccured) and nothing else. And the side, which raises the event (publisher/sender) and sends the message, naturally waits for the eventOccured method to return (unless the method is launched in a separate thread). This would be the ideal situation for me.
The reason why I decided to spend time playing with JMS was that I needed a solution which could stand multi-threading, scaling and high-load situations. And at this point it is normally preferred to select an existing time-proven solution rather then inventing anything by my own :).
Thanks again and all the best to you as well!

Similar Messages

  • How can I create a user with rights to install packages on a publish instance?

    Hi,
    I am trying to create a user with the rights to upload and install content packages on a CQ publish instance and I do not wish to use the admin user.  Simply adding a new user to the administrators group does not seem to be enough.
    I tried adding a rep:GrantACE node through crx de/explorer but it reported the node as locked.  I was able to upload a content package that removed the rep:DenyACE jcr:read for everyone, but this is not safe it seems.
    Is there some special privilege that I need to add to my user/group that will allow them to access the /etc/packages tree or do I just need to add some permission somewhere within the tree.
    Regards,
    Chris

    With some help from David Collie, Alex Klimetschek & Jörg Hoh I have a better idea of what is going on and we've found a solution. 
    It seems that the admin account always works in these scenarios as it has special privileges in the CRX security system; admin can do anything it likes.
    Instead of creating the rep:GrantACE nodes directly, I was able to add a new ACL entry for the administrators group to /etc/packages via the Access Control Editor (http://localhost:4502/crx/explorer/ui/aceditor.jsp?ck=1373027669916&Name=acEditor&Path=%2F etc%2Fpackages&_charset_=utf-8). 
    Strangely, the administrators account already had some inherited rights on this directory that were overridden by the deny|everyone|jcr:read ACL entry on /etc/packages node.  Adding allow:administrators|jcr:read gives any member of that group access to read and write to the /etc/packages. directory.
    Now that I have setup this user we can setup a deploy step in out CI build that does not rely on using the admin account.
    Thanks
    Chris

  • Lightroom 5 - Creating and Publishing a Book | Getting Started with Adobe Photoshop Lightroom 5 | Adobe TV

    Create and publish your own book using the Book module in Lightroom. Discover how to quickly add text and images, change layouts and customize templates.
    http://adobe.ly/12t1S9f

    You are one of the best presenters. Easy to keep track with what you explain.Thanks

  • Error in JMS receiver adapter: "Error creating initial context with environment"

    Hello,
    I have some trouble with a JMS receiver adapter (access to JMS-provider with JNDI).
    The message in adapter monitoring is:
    A channel error occurred. Detailed error (if any) :
    com.sap.aii.adapter.jms.api.connector.ConnectorException: Fatal Error looking up connection factoryJMSQueueConnectionFactory, for profile: ConnectionProfile of channel: CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd:
    ConnectorException: Error creating initial context with environment: java.naming.provider.url=wcsefdev.example.com:9064; java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory; for profile: ConnectionProfile of channel:
    CC_JMS_RCV_XLIMI00001on node: 503473150 having object id: 5b424f2f79b6350ca636ab35d528cfdd: javax.naming.NoInitialContextException:
    Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory<br> at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory
    (JndiConnectorImpl.java:152)<br> ....
    Message processing failed. Cause:
    com.sap.aii.adapter.jms.core.fsm.DFA$InvalidTransitionException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_RCV_XLIMI00001:5b424f2f79b6350ca636ab35d528cfdd
    The third party assured me that the specified JNDI parameters are right and everything is configured on their site, so it should work...
    Might there be a problem with the JMS drivers?
    Regards,
    Marcus

    Hi Marcus,
    Have a look at below thread
    Connecting to PI 7.11 JMS Queue from other PI 7.11 Server

  • QoS issue with OSB publish to JMS business service

    Hi,
    1. I have a http OSB proxy service which is publishing an audit message to a JMS queue through OSB business service.
    MainProxyService (http) --> Publish (best-effort) --> AuditBusinessService (JMS) --> Audit Queue
    2. I want 'Publish to JMS business service' to be a non-blocking call so that proxy service message flow can continue. Transaction support is disabled in proxy service as well as in JMS connection factory.
    3. As default value of QoS (quality of service) for publish action is best-effort, ideally proxy service should continue its message flow immediately after dispatching the message to publish action and it should not block the main proxy flow.
    4. But in my case, proxy service is blocking the message flow until the message is delivered to JMS business service/JMS queue. This is degrading performance of my application.
    5. I think default 'best-effort' QoS is not working with JMS business service as there is a significant time lag between publish action and its next subsequent action.
    6. If I replace the JMS business service with HTTP business service, then it seems to be a non-blocking call and message flow immediately proceeds to next actions.
    Correct me if I am going wrong anywhere or my understanding is wrong.
    Many thanks.

    HI,
    u can use Conditional Branching
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1061670
    Split join would be used in case u need to split your request and call your Business Service in Serial/parallel & then gather resposnes from multiple callouts to have single response
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/splitjoin.html#wp1137258
    Abhinav

  • Implementing synchronous request response behaviour with JMS

    i have a requirement wherein i send a list of tasks to be executed (this has to be executed in parallel so taking the JMS route) and should wait for the results of al these tasks. How could i do this with JMS? I need JMS since the originally these tasks was being done using threading and since in j2ee it is not advisable to spawn threads we are planning to use JMS so that we can have concurrency that is done by the container. can someone please tell how can i simulate this synchronous request-response paradigm using JMS?

    It may not be great idea however possibility of State full session bean can be explored.
    State full session bean will send all 100 tasks to JMS queue without waiting for the result. There will be another JMS program (Say ResponseCollector) which will listen on queue for all responses. Once ResponseCollector collects all the responses, it will trigger the state full session bean again.
    You can use some properties in JMS header to discriminate between the request and response on same queue and apply the message selector.

  • Creating a Publishing Page with SharePoint Server 2013 Enterprise & SharePoint Designer 2013

    How can I create a Publishing Page using my existing Master Page. The purpose of this is that I want to use page layouts within that page. I cannot understand how to do that. I even tried from the SharePoint Designer 2013. Could someone help me to solve
    this matter.
    Thank You,
    Regards,
    Chiranthaka.

    Are you having trouble creating a custom page layout, getting it to appear when creating a Publishing Page, or getting it to use your custom Master Page?
    - If you are having trouble creating a page layout take a look at the following article:
    http://sharepoint-works.blogspot.com/2013/08/create-custom-page-layouts-in.html#.U0KQYPnxpaE
    - If you aren't seeing your page layout when creating a custom page check the settings under Page Layout and Site Templates in the Look and Feel
    section of the Site Settings page.
    - The master page used by all Publishing Pages is the Site Master Page.  You can change which Master page is used in the Master Page link in the Look and Feel section of the Site Settings page.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Issue in Synchronous OSB using Jms Queues in OSB11g

    Hi,
    I am working on building a synchronous OSB using the following steps.
    1)     Creating the Synchronous OSB Proxy Service which routes the message to the business service which in turn places a message in the Queue(inqueue) by populating the JMSCorrelationId and waits for the response message to consume from another queue.
    2)     A Composite(SOA) will consume the message from this Queue
    3)     It will do necessary transformation and Places it in another Queue (Say Response Queue).
    4)     OSB Business service waiting in Step 1 will receive the response from this response Queue.
    I used a sample Wsdl which has both request and response message types.
    I observed that the correlation ID is maintained properly from inqueue to response queue. But the message is not getting picked up by OSB from the response Queue
    Twist: It is working absolutely fine in OSB 10g but it is not working in OSB 11g.
    I tried using Messaging service as well as using the sample WSDL i.e keepiing the soap message in the queue. Both the cases are working absolutely fine OSB 10g but not in OSB 11g.
    Can anyone faced a similar issue or any pointers will be great help in this regard.
    Regards,
    Ashok

    To debug this further can you check if the response Q has any active consumers. ? When you use response by correlation ID business service, OSB actually creates MDB's with message selectors under the hood.
    This is a sample of the ejb-jar.xml of the MDB created for a business service with response by Correlation ID pattern.
    <?xml version='1.0' encoding='UTF-8'?>
    <jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
    <jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
    <jav:enterprise-beans>
    <jav:message-driven>
    <jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
    <jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
    <jav:transaction-type>Container</jav:transaction-type>
    <jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
    <jav:activation-config>
    *<jav:activation-config-property>*
    *<jav:activation-config-property-name>messageSelector</jav:activation-config-property-name>*
    *<jav:activation-config-property-value>JMSCorrelationID LIKE 'ID:424541534594cf52%'</jav:activation-config-property-value>*
    *</jav:activation-config-property>*
    </jav:activation-config>
    <jav:env-entry>
    <jav:env-entry-name>service-ref</jav:env-entry-name>
    <jav:env-entry-type>java.lang.String</jav:env-entry-type>
    <jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
    </jav:env-entry>
    As you can see the message selector is based on JMSCorrelationID LIKE 'ID:424541534594cf52%'. This means the business service will pick only those messages which has its correlation ID starting with ID:424541534594cf52.
    You can see the message selector for your MDB from admin console --> deployments.
    Check and confirm if the correlation ID created in the request also starts with this value and the same is send back from the server. Also try deleting and recreating the business service or rename the business service which will create a new MDB under the hood and check the above.

  • Load balance with JMS in cluster

              I would like to develop a MDB listening to a topic, which can be deployed in a
              weblogic cluster, so that whenever a message is published to that topic, one and
              only one of the MDB in a wls server of the cluster will process the message, what
              is the best way to do this?
              thanks
              Zhou
              

    Do you desire a distributed topic that doesn't replicate
              between topic members, but replicates
              to all subscribers on a particular member?
              If so, then a distributed topic is NOT
              what you want to configure. Instead, you can do as you
              suggest: set JNDINameReplicated to false
              and put a same JNDI named topic on each server.
              Tom
              Tom Barnes wrote:
              >
              >
              > x zhou wrote:
              >
              >> Can I do the following to achive what I want:
              >
              >
              > I don't know what you want. But a message sent to a topic
              > member still gets replicated to the other topic members.
              >
              > I'm guessing what you are looking for is a
              > distributed queue, not a distributed topic. I suggest
              > you look at the distributed queue option. A message
              > sent to a distributed queue will only get processed
              > by one MDB.
              >
              >>
              >> 1) create a distributed topic having topic name "topic.distributed"
              >> that has "topic.1"
              >> and "topic.2" as its member on two wls instances in a cluster
              >>
              >> 2) write a MDB that will be deployed seperately to 2 wls instances in
              >> the cluster,
              >> with different weblogic-ejb-jar.xml file: the difference is at the line:
              >>
              >> <destination-jndi-name>topic.1</destination-jndi-name> for server 1;
              >> <destination-jndi-name>topic.2</destination-jndi-name> for server 2;
              >>
              >> 3) create the publisher using the distributed topic (of jndi name
              >> 'distribute.topic'),
              >> according the document, it should send the message to one and only one
              >> of its
              >> member, and therefore the corresponding MDB in the wls instance of the
              >> cluster
              >> which receives the message will be notified
              >>
              >> and this will give me multi-threading in the same wls instance
              >> (because of MDB)
              >> and load-balancing across the whole cluster, right?
              >>
              >> Incidently, it looks like I can make the topic member's jndi name the
              >> same, as
              >> long as I un-check the "Replicate JNDI Name In Cluster" checkbox. Why
              >> is there
              >> such a box in the first place? Isn't the topic not clusterable?
              >>
              >> thanks
              >>
              >>
              >> Tom Barnes <[email protected]> wrote:
              >>
              >>> (1) Currently, there is no way in WL to get multiple consumers to share
              >>> a topic subscription - which is essentially what you are asking for.
              >>> The JMS standard doesn't support this either. This is not to say
              >>> that it wouldn't be a useful feature - I personally think it would be.
              >>>
              >>> (2) Why not use a queue?
              >>>
              >>> Tom
              >>>
              >>> X Zhou wrote:
              >>>
              >>>
              >>>> I would like to develop a MDB listening to a topic, which can be
              >>>> deployed
              >>>
              >>>
              >>> in a
              >>>
              >>>> weblogic cluster, so that whenever a message is published to that
              >>>> topic,
              >>>
              >>>
              >>> one and
              >>>
              >>>> only one of the MDB in a wls server of the cluster will process the
              >>>
              >>>
              >>> message, what
              >>>
              >>>> is the best way to do this?
              >>>>
              >>>> thanks
              >>>>
              >>>> Zhou
              >>>
              >>>
              >>
              >
              

  • Problem with JMS in a Cluster

    In summary I am having a problem with my application when it is running on the server that does not contain the JMS.
              Setup:
              2 machines:- Server 1 with the Admin Server and a Managed Server with JMS and a Distributed Queue. Second machine (Server 2) with a managed server. The two managed servers are in a Cluster.
              The connection factory has xa enabled.
              The queue is a distributed queue, with one member queue - on server 1.
              Scenario 1 (works):
              Deploy my application on Server 1 only
              Scenario 2 (works):
              Deploy my application on Server 1 and Server 2
              When the application puts messages on the JMS queue, the messages are processed round robin by the MDB on both Server 1 and Server 2 - as expected.
              Scenario 3 - Does not work
              Deploy my application on Server 2 only
              The application successfully sends a message to the queue - I can see it in queue through the console.
              However the MDB never processes the message. On the queue, I can see 0 consumers.
              Essentially the MDB appears to deploy correctly from the server log but never appears as a consumer on the queue.
              I know the above information is very brief, however I can provide more configuration details and detailed logging if required.

    On a further look through the logs, I have found the following Warning message which may point to the reason why my MDB is not receiving messages from JMS:
              <25-Apr-2005 17:26:01 o'clock IST> <Warning> <EJB> <BEA-010220> <The jms destination 'AsyncMessageQueue' is a distributed destination and it has no physical destination(s) on the current weblogic server. As per distributed destination co-location rules, no pool was creted for the MDB 'AsyncMessage(Application: m3-j2ee_Weblogic21apr_2, EJBComponent: ejb_framework.jar)' on this weblogic server. Hence the MDB 'AsyncMessage(Application: m3-j2ee_Weblogic21apr_2, EJBComponent: ejb_framework.jar)' cannot receive any messages on this server.>
              I have created a Destination on the JMS Server ("Replicate JNDI Name In Cluster" is set), and I have created a Distributed Destination, which has as its member the Destination associated with the JMS Server.
              If the JMS is not on the same server as the deployed application, how do I get the MDB to connect to the physical destination?
              Do I always need a Physical Destination on the the same server as my deployed application? If so, how do I create a Physical Destination on the server that does not have the JMS?
              Any help appreciated.

  • Scratch 22: Creating XML Publisher report from scratch in eBS

    Problem:
    How to build a XML Publisher (XMLP) report in eBS from scratch. Thus NOT adapting or converting an existing report.
    Context:
    I have an eBS R12 Vision instance up and running where I want to learn building XMLP reports.
    This is what all tutorials I can find tell me to do:
    Most reports apparently consist of a layout template e.g. TEST.rtf and a data template e.g. TEST.xml. Now in order to generate a new report layout I am supposed to take existing output in XML format and (using ‘Load Data’ function in Template Builder plugin in Word) specify in my layout template where and how I want the actual data to pop up. So far so good.
    But now I want to build the data template from scratch and use it combined with a layout template. So I build the data template but can’t use that for building the layout template. For that I need output, for which I need a layout template.....
    Sounds like Catch 22 to me. How do I break this?
    1. Can I generate an XML-output file from the XML Data Template alone?
    2. Can I build my (RTF) layout template directly based upon the XML Data Template?
    3. Or have I completely lost the plot?
    Oh yes, dunno the first thing about Java and do not have My Oracle Support..
    Edited by: rjvencken on Jul 5, 2012 10:39 AM
    Edited by: rjvencken on Jul 5, 2012 10:51 AM

    1. Can I generate an XML-output file from the XML Data Template alone?
    create data definition with your data template-> create concurrent -> output as xml -> run -> view output and your xml
    I thought the XDODTEXE engine would pick up the (Layout) Template through concurrent program definition CPD short name which in turn points to the Data Definition (and thus Data Template). So does your answer mean I can call straight from CPD to Data Definition? I tried registering my Data Template in the Template Tab but it will not take XML as a type.2. Can I build my (RTF) layout template directly based upon the XML Data Template?
    if you want to use xml publisher desktop then you need xml (with data, not definition)
    So that's not an option I understand. Weird cuz I'd expect this to be technically easier.btw you can create your layout (rtf) without xml (data) and without data template (xml with select statement)
    create filed and past tag definition
    Yes but in that case I'd have an empty report. How would that help me?bouble click on filed:
    "Text Form Field Options" -> "Add Help Text ..." -> "Status Bar" (tab) -> "Type your own:"
    if you use bi publisher desktop plugin
    bouble click on filed:
    "BI Publisher Properties" -> "Advanced" -> "Code"
    or switch to Word Properties
    "BI Publisher Properties" -> "Word Properties" and use above path
    3. Or have I completely lost the plot?
    may be ;)

  • Is it possible to create a form with multiple form fields on a single line?

    Is it possible to create a form with multiple form fields on a single line?  I can't find anything in the documentation or a template that does this.
    I am trying to create a "documents received" checklist with a check box on the left margin, a date-received field to the right of the check box and and a description of the document (Formatted Text) on the far right.
    In the past I have entered the Fixed Text with a word processor, published it to a PDF file, then added the check box and date fields with the Acrobat Forms editor.  I would prefer to use FormsCentral if it is possible.

    We now support multiple fields on one line. This post provides a brief overview.
    Give it a try and send us your feedback.
    Sorry it took so long.
    Randy

  • Workflow event bus1022-created triggered twice with ME21Nu200F

    Hi everybody
    The explanation to my problem is as follow: Initially I was using the Tcode AS01, ME21N, ABUMN to create fixed assets and every asset created triggers the event BUS1022-CREATED, but then I set the system to synchronizing assets with equipments (SPRO -> Financial accounting->Assets accounting->Master Data->Automatic creation of equipment master recordsu2026u2026) but the event BUS1022-CREATED didn´t triggered any more so I create the new entry in SWEC with ANLA as objet of modification and the OBJ BUS1022 and the event CREATED for the creation for any new record; It works but now the problem is that this event  is being created twice with the Tcode ME21N.
    Any suggestion?
    Thanks a lot.
    Felipe Uribe

    Hello Felipe,
    a check on the TCode during the event coupling seems to be the most effective way here. However, only checking on sy-tcode will not help you much, as you don't know the source (change document / application event).
    So what you need to round up your work-around is a flag in the event container that tells you, if the event was created through the SWEC, and if yes, by which transaction code.
    - To do so, create a subtype of BUS1022 with a system wide delegation.
    - Create two new additional event parameters: TransactionCode  (type syst-tcode) and ByChangeDocument  (type boole-boole)
    - Create a function module Z_SWEC_CONTAINER_BUS1022 copied from SWE_CD_TEMPLATE_CONTAINER_FB (or SWE_CD_TEMPLATE_CONTAINER_FB_2 depending on your ABAP OO experiences) and enter this function module under "Event container" in the maintenance entry of SWEC/BUS1022/CREATED
    - Within that event container function module, you just set the two event container elements using the value of SY-TCODE for the field TransactionCode and a fixed 'X' for the value of the field ByChangeDocument
    - Create a new check function module (or workflow start condition) -- as described earlier in this thread -- that checks on:
    ( ByChangeDocument = 'X' AND TransactionCode = 'ME21N' ) OR ( ByChangeDocument = ' ' ).
    This way you'll sort out the doubled events through the change document for all other transactions than ME21N.
    Good luck,
    Florin

  • How do I create a dropdown with three options so that only one is visible in a form (non-flowable)

    I'm working on a form which needs to provides three options for the user out of a drop down list. When the user chooses one option, only that subform is to be visible. Two of the three subforms are text fields, and the third subform is a series of fields which are editable by the user.
    How do i create a dropdown with three options in it, so that in each instance only one subform is visible? This needs to happen in the same space on the main form.

    Hi Nellie,
    Here is the form back to you. There were three main issues:
    In order for dynamic behaviour, like showing and hiding, the form must be saved as a Dynamic XML Form in the save-as dialog.
    While you can use a minus sign when naming objects and subforms, it will cause scripts to fail. I have changed the name of the subforms so that they now use an underscore.
    The dropdown had specified values in the Object > Binding palette (1, 2, 3), so the script needs to use these in the if statements.
    When sharing forms on Acrobat.com, the best option is to select the file in your workspace and then click Publish. This will make it available to anyone who has the published URL.
    I hope that helps,
    Niall

  • I created a publisher file, saved it as a pdf. The problem is I created it landscape and it only shows portrait cutting the sides off my document.

    I created a publisher file, saved it as a pdf. The problem is I created it landscape and it only shows portrait cutting the sides off my document.

    Sounds as if you used Microsoft software to make a PDF. If so, and you didn't use Adobe Acrobat ($$), then you need to get help with Publisher -- Adobe Reader only shows what you make.

Maybe you are looking for

  • Opening and Cumulated Balances of PCA

    Dear BI Gurus,        I am using two standard (PCA) Data Sources <b>1. 0EC_PCA_3 and 2. 0EC_PCA_4</b>      to Load data into my Custom Cube.I need Cumulated balance and Opening Balance of Actual Line Items for my reporting purpose. There is an object

  • Ableton Live 9.1.7 instruments cause kernel panics

    Hello, only whenever I use an internal instrument in Ableton, my computer goes kernel panic. My libraries are outside the internal SSD (I have them on a 2 TB WD MyPassport Ultra), and the DAW is into the SSD. I always keep connected them while using

  • Error Message when trying to open AppWorld

    I downloaded AppWorld to my phone and when I tried to open it I got: Error starting net_rim_bb_appwprld: Module 'net_rim_bb_appwprld-6' not found Why did I get this and how can it be fixed? Thanks! Solved! Go to Solution.

  • Unable to install flashplayer on Windows 7 and Firefox

    I have tried to upload this 6 times. Each time it stalls and quits between 7 and 49%.  Anyone have any ideas on how to upload this, if not then there is no point in having firefox.  And I refuse to use IE.

  • Passing Parameters to SQL Query and Displaying Result

    The user enters a serial number in a text box and then pushes a button to get info about the serial number. I do this with two regions. The first region has the text box and the button. The second region is a Report type region and contains the follo