<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cloning Messages on System V Message Queue in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428926#M859435</link>
    <description>There is no straighforward way to do this because msgrcv() remove the data from the message queue. You could, of course, then use msgsnd() to make multiple copies but you would typically have to redesign your entire protocol. Typically when I use message queues I let the clients send a request to the server with a low valued (e.g.) message type. The server then does a msgsnd and sets the msgtyp equal to the client's PID so that it alone gets the message meant for it because the client's msgrcv is looking only for msgtyp's set to its own PID.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Nov 2004 15:06:06 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-11-23T15:06:06Z</dc:date>
    <item>
      <title>Cloning Messages on System V Message Queue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428925#M859434</link>
      <description>We have an application which is based on System V Message Queue running on HPUX. Data is sent/received on both ends of queue. Is  there a way to clone the packets flowing through the queue. Suppose if there is another application attached to the same queue, is there any way to make copies of the packets and route the packets to all the applications attached to the end of the source queue. Any help on this regard would be highly appreciated.</description>
      <pubDate>Tue, 23 Nov 2004 12:46:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428925#M859434</guid>
      <dc:creator>Srikanth_14</dc:creator>
      <dc:date>2004-11-23T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cloning Messages on System V Message Queue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428926#M859435</link>
      <description>There is no straighforward way to do this because msgrcv() remove the data from the message queue. You could, of course, then use msgsnd() to make multiple copies but you would typically have to redesign your entire protocol. Typically when I use message queues I let the clients send a request to the server with a low valued (e.g.) message type. The server then does a msgsnd and sets the msgtyp equal to the client's PID so that it alone gets the message meant for it because the client's msgrcv is looking only for msgtyp's set to its own PID.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Nov 2004 15:06:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428926#M859435</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-11-23T15:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cloning Messages on System V Message Queue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428927#M859436</link>
      <description>The application system which is Message Driven is a third party software and hence we are not in a position to modify the source. We are trying to analyze the message packets flowing through the Queues and hence require the messages to be cloned. Are there any workarounds to make multiple copies of the messages flowing through Messages Queues ?</description>
      <pubDate>Tue, 23 Nov 2004 15:19:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428927#M859436</guid>
      <dc:creator>Srikanth_14</dc:creator>
      <dc:date>2004-11-23T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cloning Messages on System V Message Queue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428928#M859437</link>
      <description>In that case, you are very limited. What you might be able to do is have a process doing a msgrcv() with msgtyp = 0 so that the first available message is read. As soon as it is read, you copy the data to buffers, do a msgsnd() to put the message back on the queue and then nanosleep a bit so that you don't read your own message in the next cycle. How well this would work depends upon the application's msg protocol works AND it assumes that the message queue was not setup as IPC_PRIVATE.&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Nov 2004 15:28:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428928#M859437</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-11-23T15:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cloning Messages on System V Message Queue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428929#M859438</link>
      <description>&lt;BR /&gt;You may want to make up your own messaging structures out of a shared memory segment and semiphores.  Quite often I have found that message queues dont do exactly what people want them and do not always hold the correct data structures so building your own structures with a semiphore may be better off.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Nov 2004 09:17:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cloning-messages-on-system-v-message-queue/m-p/3428929#M859438</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2004-11-24T09:17:46Z</dc:date>
    </item>
  </channel>
</rss>

