Conditionally sending messages to multiple consumers

How would I best accomplish this requirement?
I have one system which produces messages
Multiple systems may want to consume those messages
I want the producer to be able to send messages conditionally
In one instance perhaps I send same message to each consumer
However in another case maybe I only want to send a message to consumers A and B
It would be OK if I could flag certain messages to be for certain consumers, and then those consumers only retrieve those messages designated to them. However I dont think this is possible as any such flag the consumer would have to read once it actually consumes the message and reads it, I dont think there is any way for the queue to make that decision for them.
So it sounds like what I need is a hybrid of point-to-point and publish-subscribe
I want a universal way to conditionally send messages to one or more consumers, and the conditions are dynamic.
Any suggestions?
Must it be a PTP with separate queue for every application?

lozina wrote:
Interesting... message filters. I like it.
So with this approach, I can send some messages to everyone, and other messages I can have tailored to specific subscribers?pretty much.
But the subscriber does not actually have to "fetch" each message to determine if the message is meant for him or not, right? When using message filters this act at the queue, not at the client? Basically I want to avoid a client downloading 1,000 messages only to find out none of them are for him. unfortunately, that's probably up to the implementation. the implementation may choose to work that way (download every message and check it), or it may have a way of applying the filter at the server. however, the filters work only on the message properties, so the impl may be able to just get message headers and filter w/out getting the entire message. you'll have to test with the jms impl you are planning on using and see how that works.
Thanks!
[Edit] these are called Message Selectors right? yes.
And looks like they are specified at the time the client looks up the queue in JNDI?yes, these are provided at subscription time.
Now is this limited to publish-subscribe?no you can use selectors when subscribing to a queue as well. but, queues won't scale very well to lots of consumers (and are hard to manage with dynamic numbers of consumers).

Similar Messages

  • I am not able to send messages to multiple person from my iphone 5s after updating to ios 8.1.2. It shows message not delievered

    I am not able to send messages to multiple person from my iphone 5s after updating to ios 8.1.2. It shows message not delievered

    Hi waqaskhan91,
    Thank you for visiting Apple Support Communities.
    If you're not able to send text or iMessages to certain contacts after updating your iPhone, start with the troubleshooting tips in this article:
    iOS: Troubleshooting Messages - Apple Support
    If you only see this behavior with a few contacts, you may want to try these steps first:
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and recreate the contact from the Contacts app. Send a new message to the contact.
    Best Regards,
    Jeremy

  • Send message to multiple contacts from iphone

    send message to multiple contacts from iphone

    Open.a.new.text.message.and.add.one.contact.but.then.press.the.plus.button.that. is.on.the.right.side.of.the.name.to.add.others.

  • Single queue: concurrent processing of messages in multiple consumers

    Hi,
    I am new to jms . The goal is to  process messages concurrently from a queue in an asynchronous listener's onMessage method  by attaching a listener instance to multiple consumer's with each consumer using its own session and running in a separate thread, that way the messages are passed on to the different consumers for concurrent processing. 
    1) Is it ossible to process messsages concurrently from a single queue by creating multiple consumers ?
    2)  I came up with the below code, but would like to get your thoughts on whether the below code looks correct for what I want to accomplish.  
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.Destination;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import com.walmart.platform.jms.client.JMSConnectionFactory;
    public class QueueConsumer implements Runnable, MessageListener {
      public static void main(String[] args) {
       // Create an instance of the client
        QueueConsumer consumer1 = new QueueConsumer();
        QueueConsumer consumer2 = new QueueConsumer();
        try {
        consumer1.init("oms","US.Q.CHECKOUT-ORDER.1.0.JSON");   //US.Q.CHECKOUT-ORDER.1.0.JSON   is the queue name
        consumer2.init("oms","US.Q.CHECKOUT-ORDER.1.0.JSON");
        }catch( JMSException ex ){
        ex.printStackTrace();
        System.exit(-1);
        // Start the client running
        Thread newThread1 = new Thread(consumer1);
        Thread newThread2 = new Thread(consumer1);
        newThread1.start();newThread2.start();
        InputStreamReader aISR = new InputStreamReader(System.in);
              char aAnswer = ' ';
              do {
                  try {
      aAnswer = (char) aISR.read();
    catch (IOException e)
      // TODO Auto-generated catch block
      e.printStackTrace();
    } while ((aAnswer != 'q') && (aAnswer != 'Q'));
              newThread1.interrupt();
              newThread2.interrupt();
              try {
      newThread1.join();newThread2.join();
      } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
              System.out
      .println("--------------------exiting main thread------------------------"+Thread.currentThread().getId());
            System.exit(0);
    // values will be read from a resource properties file
    private static String connectionFactoryName = null;
    private static String queueName = null;
    // thread safe object ref
      private static ConnectionFactory qcf = null;
      private static Connection queueConnection = null;
    // not thread safe
      private Session ses = null;
      private Destination queue = null;
      private MessageConsumer msgConsumer = null;
      public static final Logger logger = LoggerFactory
      .getLogger(QueueConsumer.class);
      public QueueConsumer() {
      super();
      public void onMessage(Message msg) {
      if (msg instanceof TextMessage) {
      try {
      System.out
      .println("listener is "+Thread.currentThread().getId()+"--------------------Message recieved from queue is ------------------------"
      + ((TextMessage) msg).getJMSMessageID());
      } catch (JMSException ex) {
      ex.printStackTrace();
      public void run() {
      // Start listening
      try {
      queueConnection.start();
      } catch (JMSException e) {
      e.printStackTrace();
      System.exit(-1);
      while (!Thread.currentThread().isInterrupted()) {
      synchronized (this) {
      try {
      wait();
      } catch (InterruptedException ex) {
      break;
      * This method is called to set up and initialize the necessary Session,
      * destination and message listener
      * @param queue2
      * @param factoryName
      public void init(String factoryName, String queue2) throws JMSException {
      try {
      qcf = new JMSConnectionFactory(factoryName);
      /* create the connection */
      queueConnection = qcf.createConnection();
      * Create a session that is non-transacted and is client
      * acknowledged
      ses = queueConnection.createSession(false,
      Session.CLIENT_ACKNOWLEDGE);
      queue = ses.createQueue(queue2);
      logger.info("Subscribing to destination: " + queue2);
      msgConsumer = ses.createConsumer(queue);
      /* set the listener  */
      msgConsumer.setMessageListener(this);
      System.out.println("Listening on queue " +queue2);
      } catch (Exception e) {
      e.printStackTrace();
      System.exit(-1);
      private static void setConnectionFactoryName(String name) {
      connectionFactoryName = name;
      private static String getQueueName() {
      return queueName;
      private static void setQueueName(String name) {
      queueName = name;

    Hi Mark,
    if the messages are sent with quality of service EO (=exactly once) you can add queues.
    From documentation:
    Netweaver XI -> Runtime -> Processing xml messages -> Queues for asynchronous message processing
    ...For incoming messages you set the parameter EO_INBOUND_PARALLEL from the Tuning category.
    If more than one message is sent to the same receiver, use the configuration parameter EO_OUTBOUND_PARALLEL of the Tuning category to process messages simultaneously in different queues.
    Transaction: SXMB_ADM
    Regards
    Holger

  • Cannot send messages to multiple recipients

    I can't send messages (Imessage or regular SMS) to more than one person at a time, and cannot send any picture messages. This recently started happening out of the blue on my new Iphone 4s. Any suggestions? I've tried changing the numbers of my contacts to make sure they have a +1 (area code), but that didn't work. i keep getting the red exclamation point next to the message and when i click "try again" it doesn't work. Thanks!

    You should check with your SMSC number.
    Regards;
    Fashion 2012

  • Send Message From Multiple People

    I have Outlook 2010 and I would like to send an email from two accounts. We are working on a project together and we want the Email to be from both of us. I have access to the second account but is there a way to make it send emails from two people instead
    of just me or just her? 

    Hi,
    There is no option in Outlook to add two account in From field for a message or send messages from both of two users.
    Personal suggestion, we can consider the following method:
    1. Create a new security distribution group (ProjectX) in Exchange server with two members: UserA and UserB.
    http://technet.microsoft.com/en-us/library/bb124513(v=exchg.150).aspx
    2. Give send as permission to UserA and UserB for this distribution group(ProjectX).
    Add-ADPermission -Identity “ProjectX” -User UserA -Extendedrights "Send As"
    Add-ADPermission -Identity “ProjectX” -User UserB -Extendedrights "Send As"
    3. Then UserA and UserB can send messages as the project group to others. The recipients would receive the messages which the From field is shown the group name instead of UserA or UserB.
    Hope it helps.
    Regards,
    Winnie Liang
    TechNet Community Support

  • HT5622 I cant send messages to multiple recipient

    I can't send itext or imsm  multiples recipients

    Settings > Messages > MMS Messaging and Group Messaging > make sure switch is ON (green side showing)

  • IPhone 5 iOS7 - Sending text to multiple recipients.

    I have recently upgraded from my trusty iPhone 3GS to an iPhone 5 with iOS7. The phone is locked to the UK O2 Network.
    When abroad multiple recipient text could be sent incurring a European Text Message Cost of 6p per recipient. So far so good. Idid not use data when I was abroad as I had the Roaming option off.
    When back in the UK I tried to send Multiple Recipeint texts only to find there was a problem.
    The recipeint received a message saying that I had sent them a Media Message without the text being included. I incurred a 33p cost per multiple text instead od the texts being free.
    I have never paid for texts before as I am on an unlimited text tariff.
    Any suggestions other than sending each text individually.
    O2 seem to be aware of this issue.
    Is it an iOS7 issue, or an iPhone 5 issue?
    This was never a problem with my iPhone 3GS.
    Many thanks.

    I have just read this on the Apple Site:
    "iOS: Understanding group messaging
    Learn about group messaging.
    You can send a message to multiple recipients using SMS, MMS, and iMessage.
    Group messaging allows you to send messages to multiple people and have any responses delivered to everyone in the group. Group messaging works with iMessage and MMS.
    If you send a message to multiple recipients without group messaging in use by the sender and all recipients, an individual message will go to each recipient using either SMS or MMS. Responses to these messages will be delivered only to the original sender in separate messaging threads."
    This would suggest that Multiple Recipient Text do not necessarily need MMS.
    It would seem that unless MMS is prevented then Multiple Recipient Texts will default to MMS.
    I have switched off data and have been able to send Multiple Recipient Texts which the recipient has been able to read as texts.

  • How can I send a message to multiple contacts using "groups".

    How can I send a message to multiple contacts using "groups".
    It was easy on my sony ericssonn....do i need to download an app?

    There is no group send option like you are looking for.
    To send to a group you have to pick each person you want to send to and send as a group that way. Then don't delete that SMS thread and you can reuse it again later.
    As for an app, well SMS works via your carrier and the OS, not something an App can do unless the app send the data to them (a third party) and then they relay it to the carrier. Do you really want to be sending your SMS to some 3rd party first?

  • Send a message to multiple computers(Not users) from win7/xp command/or scirpt

    Hi Team, is there a way to send a message to multiple windows xp/win7 computers from my win7/xp? 3rd party software,commercial or free, command line,batch or script all welcome. I have a few hundreds of computers, ping-them alive,but I don't know their
    location and user name. I was failed  to push SCCM client to them,some could be in work group or admin$ disabled. so I plan to send a message like " please contact IT department for your pc maintenance by this Friday or this PC will be deleted from
    the corp domain", when the user contact IT, we can RDP or manual install SCCM onsite with user cooperation. The msg.exe can only send to user,instead of computer names. I tried shutdown /m \\pc-name -f -s -t 1200000 "testMessage" but I got alert
    of access denied. though it works if put my local PC name. is there any other way to accomplish this? Many thanks!
    Thanks and best regards, -- KF

    Hi,
    Base on my experience, personally I think solve this case the better method is through your help desk collect the new computer information because consider this: “some
    could be in work group or admin$ disabled”, if there have more workgroup PC, it will always hardly to manage them though a purely technical method.
    About the domain computer, you can refer the following thread I replayed solution, notice a message to users to connect IT department.
    Security Warning Message
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/60c1a896-0996-4e88-ace9-8da2284883f7/security-warning-message?forum=winserverhyperv
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Sending Text Messages to Multiple Recipients

    Is there a way to send a text message to multiple recipients? I've been trying to figure it out for a while. I feel like this is a feature that apple couldn't have just forgotten! Anybody know?

    Not supported with the iPhone - at the present time anyway with no indication that it will be supported in the future.
    Apple is known for doing research so right, wrong or indifferent, I doubt this is something Apple forgot to include.
    The only thing you can do is provide Apple feedback via the iPhone feedback link.

  • Mail with multiple gmail accounts sending messages from wrong email, other than the one i select

    mail with multiple gmail accounts sending messages from wrong email, other than the one i select:
    i'm using mail on osx 10.7 with multiple gmail accounts. when i create an email, i check to be sure i'm sending/replying from the correct account. after i send it, somehow it actually sends it from a different account, other than the one i've selected "from." this is evidenced by the reply email i receive. how can i fix this?
    in preferences, i have "send new messages from : account of selected mailbox"

    From the Mail menu bar, select
              Mail ▹ Preferences...
    The Mail preference dialog opens. Select the Composing tab from the row of icons at the top. From the menu labeled
              Send new messages from:
    choose
              Account of selected mailbox
    Note that this setting may have no effect if you start a new message while a VIP or smart mailbox is selected in the mailbox list. Those are saved searches, not actual mailboxes.
    If the problem remains, select the Accounts tab in the preference dialog, then select the affected account in the list on the left.
    In the Account Information pane, select the correct server in the menu labeled
              Outgoing Mail Server (SMTP)
    If there's only one server in the menu, select
              Edit SMTP Server List...
    and add a new server with the correct settings. If you're not sure how to do that, try the Mail Settings Lookup.
    Another possibility is that the wrong card in your address book is selected as yours. Select your card in the Contacts application. Then select
              Card ▹ Make This My Card
    from the menu bar.

  • Native email sends message multiple times

    Since I have updated to the new OS, the email app is now sending messages multiple times. When I initially send it, it appears to be unsuccessful, as it is in the Inbox with a red X. But the message is sent. The app keeps trying to send the "unsuccessful" message, and the recipient ends up receiving the same message more than once. Anyone else having this problem, or have an answer?

    This issue has not yet been resolved in the below thread either.
    http://supportforums.blackberry.com/t5/BlackBerry-PlayBook/E-mail-duplications/td-p/1675471
    I would give rim a call to let them know of your problems.
    If they can't track it they won't know how many users this is affecting. I imagine it will get solved a lot quicker if they know just how many users it's affecting.
    Good luck

  • Why can't I send multiple texts any more? I am on iphone 5 and it is only allowing me to send messages to 10 people at once! Previously on iphones 3 and 4s I could send to many more.

    Why can't I send multiple texts any more? I am on iphone 5 and it is only allowing me to send messages to 10 people at once! Previously on iphones 3 and 4s I could send to many more. I use my phone for work and want to send to multiple staff groups or project leaders the same information at the same time and not all of them have email capable phones so text has always been the best solution.
    Please help ?

    22ms is a long time for your computer, but I am wondering about your network. Are you 10 base or 100 base? Switch or hub? Have you tried a direct connection with a crossover cable? Just trying to spark ideas here. I use TCP all the time but only at 500 ms intervals.

  • HT3529 Is it possible to send a the same text message to multiple recipients?

    wanting to send the same text message to multiple contacts at the same time? is this possible

    Are you talking about in the contact window? Because when I select a contact in there the contact window appears and the plus sign in the top right is replaced with the edit button?

Maybe you are looking for

  • Order by clause  Dynamic in Oracle function

    How can i get order by Clause Dynamic in Oracle function My function Returns sql query with SYS_REFCURSOR . and i will pass the order by column as input parameter   create or replace FUNCTION TEST_SSK         p_srot  number RETURN SYS_REFCURSOR AS C_

  • Why is the spreadsheet empty when users download to Excel from ALV grid?

    Users are seeing SAP GUI transaction results display in the ALV Grid when running an SAP Report; however, when they click the Download to Excel icon the spreadsheet is empty.  When they use List...Export...Spreadsheet, the spreadsheet is filled. This

  • File-adapter with Dynamic Directory/Filenames in Header-variables

    Hi, I have looked through the file-adapter documentation. And it says that you can use wildcards/regexpressions/dynamic file and directory names using the file-adapter-wizard. Also you can use the header-variables to specify the file and directory na

  • Restoring Elements 8 Organizer data

    I'm asking this question on behalf of my parents, who are not highly computer literate.  They use Elements 8 Organizer to keep track of their extensive photo collection, including those of professional art work and many overseas trips.  In April thei

  • How to Change Document Default Status

    Hi Everyone, How can i change Document default status for Goods Receipt PO. I want like this When user create new GR PO the default status for the document should be "Draft" but now it shows status as "Open" Thanx & Regards, Amar