<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page &quot;Programming WireAPI&quot;</title>
		<link>http://www.openamq.org/doc:prog-wireapi/comments/show</link>
		<description></description>
				<copyright></copyright>
		<lastBuildDate>Sat, 04 Feb 2012 20:46:24 +0000</lastBuildDate>
		
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-1252831</guid>
				<title>WireAPI doc changes - session properties</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-1252831</link>
				<description></description>
				<pubDate>Wed, 07 Sep 2011 13:12:44 +0000</pubDate>
				<wikidot:authorName>Kevenm</wikidot:authorName>				<wikidot:authorUserId>1192489</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The Session properties are listed as<br /> &#8230;<br /> reply_code (integer) - error value reported by server<br /> consumer_tag (integer) - server-assigned consumer tag<br /> routing_key (string) - original message routing key<br /> scope (string) - queue name scope<br /> delivery_tag (integer) - server-assigned delivery tag<br /> redelivered (Boolean) - message is being redelivered</p> <p>I found while compiling on RedHat Linux, in a printf that<br /> Property consumer_tag required a char*, not an integer (%s, not %d).<br /> Property scope didn't exist. But queue does.</p> <p>Keven Miller</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-808772</guid>
				<title>Synchronous method, typo?</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-808772</link>
				<description></description>
				<pubDate>Tue, 15 Jun 2010 01:33:24 +0000</pubDate>
				<wikidot:authorName>rmuthukrishnan</wikidot:authorName>				<wikidot:authorUserId>499427</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The document above says the following:</p> <blockquote> <blockquote> <p>When you use a synchronous method (e.g. Basic.Consume), WireAPI waits for the server to respond with a synchronous reply, and it processes this reply.</p> </blockquote> </blockquote> <p>I think, you meant Basic.Get is synchronous, and not Basic.Consume.</p> <p>Thanks,<br /> Raman</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-626540</guid>
				<title>(no title)</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-626540</link>
				<description></description>
				<pubDate>Fri, 06 Nov 2009 16:24:56 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello, yes sure I would use that (the forum), I think it is actually hard to find the way in the doc right now.</p> <p>If I'm not wrong, tcp_nodelay is activated by default isn't it ? (at least this is what the doc is saying)</p> <p>To demonstrate the issue even more : this morning I had to rollback a change that gone to production with the wrong amq version (1.3d0 instead of good old 1.2c4).<br /> Latency jumped from 2/5msec up to 40/80msec.</p> <p>1.2c4 was compiled with google's allocator, 1.3d0 did not. I have to say 1.3d0 should not have gone to prod, this was a mistake cause I have had not fully validated it. Also 1.3d0 was not setup to use direct mode. But so far, the testing I have done showed that even with direct mode enabled the latency was not good at all.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-619016</guid>
				<title>Re: Tuning for latency</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-619016</link>
				<description></description>
				<pubDate>Wed, 28 Oct 2009 09:38:15 +0000</pubDate>
				<wikidot:authorName>pieterh</wikidot:authorName>				<wikidot:authorUserId>99</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Sending just a few messages means you hit buffering issues, which push up latency. You can tune this (—tcp_nodelay option). Direct mode will reduce latency as well.</p> <p>Putting these questions in a separate thread would be good. We stopped free support because it was too much work and it's nice to see OpenAMQ users helping each other, this rarely happened before.</p> <p>We're thinking of moving to a better forum for discussion. Would you use that?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-619009</guid>
				<title>Re: Tuning for latency</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-619009</link>
				<description></description>
				<pubDate>Wed, 28 Oct 2009 09:18:30 +0000</pubDate>
				<wikidot:authorName>g_makulik</wikidot:authorName>				<wikidot:authorUserId>307160</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi David,</p> <p>That's interesting. I have observed the same bad latencies with my 1st tests, that also involve sending just a handful of messages around.<br /> I am also using direct mode and it was just local distribution for these tests, I didn't touch the batching parameter. I decided to investigate later about that but now as you're asking …<br /> I would appreciate if pieter can give us a hint about this, but as he decided to cancel (free) support here :-( …</p> <p>Regards,<br /> Günther</p> <p>BTW:<br /> I think you should open separate topics/issues for your questions, I feel these threads 'pollute' the WireAPI documentation page in a way.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617819</guid>
				<title>Tuning for latency</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617819</link>
				<description></description>
				<pubDate>Mon, 26 Oct 2009 20:03:20 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>how can you tune openamq for latency ?</p> <p>I'm using direct mode with amq 1.3d0 and have this custom wireapi.cfg :<br /> &lt;?xml?&gt;<br /> &lt;config&gt;<br /> &lt;direct batching="0" on_overflow="warn"/&gt;<br /> &lt;/config&gt;</p> <p>If I send only one message without this config file, I see a local roundtrip of 40msec (client, amq and server running local).<br /> If I send only one message with this config file, I see a local roundtrip of 20msec (client, amq and server still running local)</p> <p>This is way too slow !</p> <p>When I send several thousands of messages I see a roundtrip of 60microsecs. Which is acceptable.<br /> Most of the time my system will not have so many messages but they need to be delivered fast. I need to remove all the batching so that I can achieve the same kind of low latency roundtrip (60microsecs) with a few messages per seconds.</p> <p>setting batching=0 both on wireapi.cfg and server does not seem to have the correct effect. Is there anything else I can tune ?</p> <p>Tx</p> <p>David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617564</guid>
				<title>Re: Is there a way to do a partial read ?</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617564</link>
				<description></description>
				<pubDate>Mon, 26 Oct 2009 14:39:51 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Unfortunately I cannot do that. I'm trying to refactor some historic hand written code and I don't want to do a big bang. So I'm doing a step by step refacto. In this current iteration, I want to keep the memory layout which is : a class object containing a #pragma pack structure holding the wiredata.<br /> This is not ideal, but this is what I have to work with. For now.</p> <p>I could use the field table if I could put binary data in it, but it seems like it can hold only strings. So it seems like I cannot use it.</p> <p>Looking at the source code of amq, I've also found the (undocumented) amq_content_basic_wire_get() which might do what I want, but it seems very low level and I'm not sure it's going to return only content (I'm afraid it could return also protocol content). For example : source comment says it is automatically skipping heartbeat frames. Plus it does not work out of an amq_content but uses an ip_bucket as input.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617422</guid>
				<title>Re: Is there a way to do a partial read ?</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-617422</link>
				<description></description>
				<pubDate>Mon, 26 Oct 2009 09:56:04 +0000</pubDate>
				<wikidot:authorName>g_makulik</wikidot:authorName>				<wikidot:authorUserId>307160</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi David,</p> <p>AFAIK it's not possible to do so. As far I understand your sample 'allocateObject()' does some memory allocation based on the information in the header part, right? So what about putting all your possible 'Object ' structures into a union and just reinterpret(_cast) the part after your header structure appropriately, without extra allocation and copy from the original buffer?</p> <p>BTW I would recommend you to use Google Protobuf or s.th. alike to define your messages' content. Handling wireable formats can become pretty tricky, especially if you need to interchange stuff between different machine types and using different programming languages to interpret it. Google Protobuf works pretty good for my needs and is easy to use an understand.</p> <p>HTH<br /> günther</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615942</guid>
				<title>(no title)</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615942</link>
				<description></description>
				<pubDate>Fri, 23 Oct 2009 22:52:49 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello, tx for the answer.<br /> However, this very page says :</p> <hr /> <p>Basic content properties</p> <p>All contents have these properties, which you can inspect directly using content-&gt;propertyname</p> <hr /> <p>So the documentation is not consistent and should be fixed.</p> <p>Also for my other question (partial read) : do you know where to begin ?</p> <p>Tx</p> <p>David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615516</guid>
				<title>(no title)</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615516</link>
				<description></description>
				<pubDate>Fri, 23 Oct 2009 11:42:11 +0000</pubDate>
				<wikidot:authorName>g_makulik</wikidot:authorName>				<wikidot:authorUserId>307160</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi David,</p> <p>It's documented somewhere in the common part, as far I remember, that you should never access any of the WireAPI data structures directly but<br /> use the get/set functions.</p> <p>WBR<br /> Günther</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615133</guid>
				<title>(no title)</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-615133</link>
				<description></description>
				<pubDate>Thu, 22 Oct 2009 21:51:39 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>All right… Found method amq_content_basic_get_body_size() which returns the correct size…</p> <p>Should'nt the documentation be fixed to stress that you cannot access directly the properties but you need to call the get_XXX() functions ?</p> <p>Tx</p> <p>David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-614754</guid>
				<title>amq_content_basic_set_body_size ?</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-614754</link>
				<description></description>
				<pubDate>Thu, 22 Oct 2009 13:30:39 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>all messages I receive have body_size == 0<br /> There is no method amq_content_basic_set_body_size() while section "Basic content property" (<a href="http://www.openamq.org/doc:prog-wireapi/comments/show#toc40">http://www.openamq.org/doc:prog-wireapi/comments/show#toc40</a>) says all properties are settable using amq_content_basic_set_[propertyname] (content, newvalue).</p> <p>I would have expected the method amq_content_basic_set_body to do it for me but it does not.</p> <p>Please advise.</p> <p>Tx</p> <p>David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-613165</guid>
				<title>Is there a way to do a partial read ?</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-613165</link>
				<description></description>
				<pubDate>Tue, 20 Oct 2009 22:21:31 +0000</pubDate>
				<wikidot:authorName>David</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello, is there a way to do a partial read of the message body ?<br /> I would like to do something like :</p> <p>pseudo code :<br /> Header header;<br /> amq_content_basic_get_body (content, (byte*)header, sizeof (Header));<br /> Object *o = allocateObject(header);<br /> amq_content_basic_get_body (content, (byte*)o-&gt;getBuffer(), o-&gt;size());</p> <p>The idea is I have some dynamic content that is going to transit through AMQ and if I cannot do a partial read, then I'm going to end up doing 2 allocations + 1 memcpy.</p> <p>pseudo code :<br /> byte buffer[SomeSize]; // first allocation<br /> amq_content_basic_get_body (content, (byte*)buffer, sizeof (buffer));<br /> Header *header = buffer;<br /> Object *o = allocateObject(header); // second allocation<br /> memcpy(o-&gt;getBuffer(), header + 1, o-&gt;size()); // memcpy</p> <p>Any idea ?</p> <p>Tx</p> <p>David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-573076</guid>
				<title>Doubt about sync vs. async</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-573076</link>
				<description></description>
				<pubDate>Mon, 31 Aug 2009 13:20:20 +0000</pubDate>
				<wikidot:authorName>LAC</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>Correct me if I misunderstood it, but the article states that Basic.Publish is always assynchronous. Is that right? Is there a sync counterpart?</p> <p>Thanks,<br /> Lac</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-560501</guid>
				<title>Re: doc error</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-560501</link>
				<description></description>
				<pubDate>Thu, 13 Aug 2009 16:35:07 +0000</pubDate>
				<wikidot:authorName>pieterh</wikidot:authorName>				<wikidot:authorUserId>99</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks for that errata, it's fixed now.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/doc:prog-wireapi/comments/show#post-559900</guid>
				<title>doc error</title>
				<link>http://www.openamq.org/doc:prog-wireapi/comments/show#post-559900</link>
				<description></description>
				<pubDate>Wed, 12 Aug 2009 19:45:57 +0000</pubDate>
				<wikidot:authorName>Carson</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>The documentation above talks about a function called amq_client_session_basic_arrived_count. This method is actually called amq_client_session_get_basic_arrived_count.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>
