qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Qpid > GetCurrentMessage
Date Sun, 14 Oct 2012 20:10:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/21/_/styles/combined.css?spaceKey=qpid&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/qpid/GetCurrentMessage">GetCurrentMessage</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~robbie">Robbie
Gemmell</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note:title=Archive
Content} <br>Please note this page is present for reference only. QMan has been removed
and is no longer a released component. <br>{note}  <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h1. GetCurrentMessage <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <div class='panelMacro'><table class='noteMacro'><colgroup><col
width='24'><col></colgroup><tr><td valign='top'><img src="/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Archive
Content</b><br />Please note this page is present for reference only. QMan has
been removed and is no longer a released component.</td></tr></table></div>


<h1><a name="GetCurrentMessage-GetCurrentMessage"></a>GetCurrentMessage</h1>

<div>
<ul>
    <li><a href='#GetCurrentMessage-Description'>Description</a></li>
    <li><a href='#GetCurrentMessage-Request'>Request</a></li>
    <li><a href='#GetCurrentMessage-Response'>Response</a></li>
    <li><a href='#GetCurrentMessage-Faults'>Faults</a></li>
    <li><a href='#GetCurrentMessage-Quicklinks'>Quick links</a></li>
</ul></div>

<h2><a name="GetCurrentMessage-Description"></a>Description</h2>

<p>Allows a requestor to retrieve the last published message on a given topic. Note
that this will be a non destructive read of the message,<br/>
which won't be dequeued and therefore will be available to other requestors.</p>

<h2><a name="GetCurrentMessage-Request"></a>Request</h2>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
01.	<span class="code-tag">&lt;soap:Envelope <span class="code-keyword">xmlns:soap</span>=<span
class="code-quote">"http://www.w3.org/2003/05/soap-envelope"</span>&gt;</span>
02.		<span class="code-tag">&lt;soap:Header&gt;</span>
03.			<span class="code-tag">&lt;wsa:To <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
04.				http://localhost:8080/qman/services/adapter
05.			<span class="code-tag">&lt;/wsa:To&gt;</span>
06.     	        <span class="code-tag">&lt;wsa:Action <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
07.				http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest
08.			<span class="code-tag">&lt;/wsa:Action&gt;</span>
09.     	        <span class="code-tag">&lt;wsa:MessageID <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
10.				uuid:0cdb5112-09e0-ac39-06ba-393843f06e42
11.			<span class="code-tag">&lt;/wsa:MessageID&gt;</span>
12.			<span class="code-tag">&lt;wsa:From <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
13.     		        <span class="code-tag">&lt;wsa:Address&gt;</span>
14.					http://www.w3.org/2005/08/addressing/role/anonymous
15.				<span class="code-tag">&lt;/wsa:Address&gt;</span>
16.			<span class="code-tag">&lt;/wsa:From&gt;</span>
17.			<span class="code-tag">&lt;/qman:ResourceId&gt;</span>
		<span class="code-tag">&lt;/soap:Header&gt;</span>
		<span class="code-tag">&lt;soap:Body&gt;</span>
18.			<span class="code-tag">&lt;wsnt:GetCurrentMessage&gt;</span>
19.				<span class="code-tag">&lt;wsnt:Topic Dialect=<span class="code-quote">"http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete"</span>&gt;</span>
20.					qman:EventsLifeCycleTopic
21.				<span class="code-tag">&lt;/wsnt:Topic&gt;</span>
22.			<span class="code-tag">&lt;/wsnt:GetCurrentMessage&gt;</span>
23.		<span class="code-tag">&lt;/soap:Body&gt;</span>
	<span class="code-tag">&lt;/soap:Envelope&gt;</span>
</pre>
</div></div>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Line(s) </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> 01 </td>
<td class='confluenceTd'> The SOAP &lt;Envelope&gt; is the root element in every
SOAP message, and contains two child elements, &lt;Header&gt; and &lt;Body&gt;.
</td>
</tr>
<tr>
<td class='confluenceTd'> 02 </td>
<td class='confluenceTd'> The SOAP Header will contain all metadata used for identifying
the conversation participants (requestor and provider). </td>
</tr>
<tr>
<td class='confluenceTd'> 03 - 05 </td>
<td class='confluenceTd'> Convey the target endpoint also known (in the request phase)
as service provider. </td>
</tr>
<tr>
<td class='confluenceTd'> 06 - 08 </td>
<td class='confluenceTd'> Indicate this is a GetCurrentMessage request. </td>
</tr>
<tr>
<td class='confluenceTd'> 09 - 11 </td>
<td class='confluenceTd'> Convey a unique identifier associated with the current message.
This will be used for request / response messages correlation. </td>
</tr>
<tr>
<td class='confluenceTd'> 12 - 15 </td>
<td class='confluenceTd'> Provide the address of the source endpoint also known (in
the request phase) as service requestor. </td>
</tr>
<tr>
<td class='confluenceTd'> 18 - 22 </td>
<td class='confluenceTd'> The GetCurrentMessage request. As you can see requested the
example shows how to request the current message of the qman:EventsLifeCycleTopic topic. <br
class="atl-forced-newline" />
 This is the topic where event lifecylcle notifications are published. </td>
</tr>
</tbody></table>
</div>


<h2><a name="GetCurrentMessage-Response"></a>Response</h2>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;soap:Envelope <span class="code-keyword">xmlns:soap</span>=<span
class="code-quote">"http://www.w3.org/2003/05/soap-envelope"</span>&gt;</span>
		<span class="code-tag">&lt;soap:Header&gt;</span>
01.			<span class="code-tag">&lt;wsa:To <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
02.				http://www.w3.org/2005/08/addressing/role/anonymous
03.			<span class="code-tag">&lt;/wsa:To&gt;</span>
04.			<span class="code-tag">&lt;wsa:Action <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
05.				http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageResponse
06.			<span class="code-tag">&lt;/wsa:Action&gt;</span>
07.			<span class="code-tag">&lt;wsa:MessageID <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
08.				uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416
09.			<span class="code-tag">&lt;/wsa:MessageID&gt;</span>
10.			<span class="code-tag">&lt;wsa:RelatesTo RelationshipType=<span class="code-quote">"wsa:Reply"</span>
<span class="code-keyword">xmlns:wsa</span>=<span class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
11.				uuid:0cdb5112-09e0-ac39-06ba-393843f06e42
12.			<span class="code-tag">&lt;/wsa:RelatesTo&gt;</span>
13.			<span class="code-tag">&lt;wsa:From <span class="code-keyword">xmlns:wsa</span>=<span
class="code-quote">"http://www.w3.org/2005/08/addressing"</span>&gt;</span>
14.				<span class="code-tag">&lt;wsa:Address&gt;</span>
15.					http://localhost:8080/qman/services/adapter
16.				<span class="code-tag">&lt;/wsa:Address&gt;</span>
20.                     <span class="code-tag">&lt;/wsa:From&gt;</span>
		<span class="code-tag">&lt;/soap:Header&gt;</span>
		<span class="code-tag">&lt;soap:Body&gt;</span>
21.			<span class="code-tag">&lt;wsnt:GetCurrentMessageResponse&gt;</span>
22.				<span class="code-tag">&lt;wsnt:Message&gt;</span>
                                   &lt;qman:LifeCycleEvent
                                         <span class="code-keyword">xmlns:qman</span>=<span
class="code-quote">"http://amqp.apache.org/qpid/management/qman"</span>
                                         TimeMillis=<span class="code-quote">"1234295015000"</span>
Type=<span class="code-quote">"CREATED"</span>&gt;
                                         <span class="code-tag">&lt;qman:Resource&gt;</span>
					       &lt;qman-wsa:ResourceId
						     <span class="code-keyword">xmlns:qman-wsa</span>=<span class="code-quote">"http://amqp.apache.org/qpid/management/qman/addressing"</span>&gt;
				                     aff2f6ec-2e5c-4768-ae87-6da2c8a005ff
					        <span class="code-tag">&lt;/qman-wsa:ResourceId&gt;</span>
                                                <span class="code-tag">&lt;qman:PackageName&gt;</span>org.apache.qpid.broker<span
class="code-tag">&lt;/qman:PackageName&gt;</span>
                                                <span class="code-tag">&lt;qman:Name&gt;</span>connection<span
class="code-tag">&lt;/qman:Name&gt;</span>
                                         <span class="code-tag">&lt;/qman:Resource&gt;</span>
                                   <span class="code-tag">&lt;/qman:LifeCycleEvent&gt;</span>
23.				<span class="code-tag">&lt;/wsnt:Message&gt;</span>
24.			<span class="code-tag">&lt;/wsnt:GetCurrentMessageResponse&gt;</span>
		<span class="code-tag">&lt;/soapBody&gt;</span>
	<span class="code-tag">&lt;/soap:Envelope&gt;</span>
</pre>
</div></div>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Line(s) </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> 01 - 03 </td>
<td class='confluenceTd'> Convey the recipient of the response message. Note that this
time we are talking about the service requestor; The address matches the &lt;wsa:From&gt;
previously found in the corresponding request. </td>
</tr>
<tr>
<td class='confluenceTd'> 04 - 06 </td>
<td class='confluenceTd'> Indicate this is a GetCurrentMessage response. This is done
as usual using a wsa:Action that is part of WS-Addressing specification. </td>
</tr>
<tr>
<td class='confluenceTd'> 07 - 09 </td>
<td class='confluenceTd'> Convey a unique identifier associated with the current response
message. </td>
</tr>
<tr>
<td class='confluenceTd'> 10 - 12 </td>
<td class='confluenceTd'> This element provides the identifier of the correlated (request)
message. </td>
</tr>
<tr>
<td class='confluenceTd'> 13 - 20 </td>
<td class='confluenceTd'> The &lt;wsa:From&gt; element (part of WS-Addressing
specs too) identifies the source endpoint, the originator of this response message. </td>
</tr>
<tr>
<td class='confluenceTd'> 14 - 16 </td>
<td class='confluenceTd'> This is the address of the source service endpoint. As said
for lines 01-03 this time this is referred to service provider (the message originator). </td>
</tr>
<tr>
<td class='confluenceTd'> 17 - 20 </td>
<td class='confluenceTd'> As part of wsa:From element, this contains (specifically on
line 18) additional information needed for identifying the originator of this message. </td>
</tr>
<tr>
<td class='confluenceTd'> 21 - 24 </td>
<td class='confluenceTd'> This is the GetCurrentMessage response. That will contain
as a nested child the last published message (lines 22 - 23). </td>
</tr>
</tbody></table>
</div>


<h2><a name="GetCurrentMessage-Faults"></a>Faults</h2>

<ul>
	<li><b>ResourceUnknownFault</b> : There's no resource on QMan associated
with the given reference information (soap address and identifier).</li>
	<li><b>ResourceUnavailableFault</b> : The requested resource is unavailable.
This fault should indicate a transient condition. That means a requester might resend the
message.</li>
	<li><b>TopicExpressionDialectUnknownFault</b> : The topic expression dialect
is unknown.</li>
	<li><b>InvalidTopicExpressionFault</b> : The topic expression is not valid
for the specified dialect.</li>
	<li><b>TopicNotSupportedFault</b> : The requested topic is not supported.</li>
	<li><b>MultipleTopicsSpecifiedFault</b> : The topic expression is ambiguous
because is referring to multiple topic.</li>
	<li><b>NoCurrentMessageOnTopicFault</b> : There's no message available
on the requested topic.</li>
</ul>


<h2><a name="GetCurrentMessage-Quicklinks"></a>Quick links</h2>

<p><a href="http://docs.oasis-open.org/wsn/wsn-ws_base_notification-1.3-spec-os.pdf"
class="external-link" rel="nofollow">Web Services Base Notification </a><br/>
<a href="http://docs.oasis-open.org/wsn/wsn-ws_topics-1.3-spec-os.pdf" class="external-link"
rel="nofollow">Web Services Topics </a></p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/qpid/GetCurrentMessage">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=111438&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/qpid/GetCurrentMessage?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message