[Rhm-users] RE: [Rhemrg-users-list] XML Exchanges
Ted Ross
tross at redhat.com
Fri Jul 18 12:07:55 UTC 2008
For what it's worth: "FieldTable" and "map" are the same thing. The
AMQP version 0-10 type called "map" is implemented in C++ by a class
called "FieldTable" (the name used in an older version of the AMQP spec
if I'm not mistaken). In Python, maps are implemented using native
dictionaries.
I can help provide examples for C++ and Python. For Java, I would need
to confer with one of the Java folks to get an example.
-Ted
Jonathan Robie wrote:
> I hit an unexpected bottleneck thinking this through ... let me feel
> things out and get back with you tomorrow.
>
> Jonathan
>
> Andrew M wrote:
>> Right, an example for FieldTable would be nice. Maybe even a sample app
>> showing a C++ program and a java program happily exchanging FieldTables
>> populated with Strings, floats, longs..
>>
>> -----Original Message-----
>> From: Jonathan Robie [mailto:jonathan.robie at redhat.com] Sent:
>> Thursday, July 17, 2008 4:41 PM
>> To: Andrew M
>> Cc: 'Ted Ross'; rhemrg-users-list at redhat.com; rhm-users at redhat.com
>> Subject: Re: [Rhm-users] RE: [Rhemrg-users-list] XML Exchanges
>>
>> I assume you mean examples for FieldTable? (You were thinking Map
>> when you wrote this.)
>>
>> I haven't done that for the tutorial yet, I'll consider it. But you
>> can write anything you want into the message, it's opaque, so any way
>> you want to get things in and out is fine.
>>
>> Jonathan
>>
>> Andrew M wrote:
>>
>>> That's excellent. If someone could add Python, C++ and Java examples
>>> in this doc it would be very helpful.
>>>
>>>
>>>
>> http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/pdf/Messaging_Tu
>>
>> torial/Messaging_Tutorial.pdf
>>> In the meantime. any suggestions where I should look for examples?
>>>
>>> Thanks,
>>>
>>> Andrew
>>>
>>> *From:* Ted Ross [mailto:tross at redhat.com]
>>> *Sent:* Thursday, July 17, 2008 2:10 PM
>>> *To:* Andrew M
>>> *Cc:* rhemrg-users-list at redhat.com; rhm-users at redhat.com
>>> *Subject:* Re: [Rhemrg-users-list] XML Exchanges
>>>
>>> Andrew M wrote:
>>>
>>> I need to put Map objects on the bus and pass them around for use by
>>> java, C++ and (potentially).NET applications. Maps will definitely
>>> consist of String-to-String mappings. There may also be
>>> String-to-Float, or String-to-Long, etc. What is the best way to do
>>> this? It does not appear that AMQP supports some native Map type
>>> like JMS. Is the correct plan to have C++ apps translate the Map
>>> to/from XML using this:
>>>
>>> http://www.codesynthesis.com/products/xsd/
>>>
>>> and java apps do the same using this:
>>>
>>> http://xerces.apache.org/
>>>
>>> Then put those bits of XML on the bus destined for an XML Exchange?
>>>
>>> This document...
>>>
>>>
>>>
>> http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/pdf/Messaging_Tu
>>
>> torial/Messaging_Tutorial.pdf
>>> talks about XML based routing in Python and C++ but not in Java. Is
>>> it not possible in Java?
>>>
>>> Thanks,
>>>
>>> Andrew
>>>
>>> _______________________________________________
>>> Rhemrg-users-list mailing list Rhemrg-users-list at redhat.com
>>> <mailto:Rhemrg-users-list at redhat.com>
>>> https://www.redhat.com/mailman/listinfo/rhemrg-users-list
>>> Andrew,
>>>
>>> AMQP has a rich type system that can be used to encode data to be
>>> placed in the payload of messages. Included is a "map" type that
>>> maps string keys to typed objects (including recursive maps of
>>> maps). Messages composed using AMQP types can be transferred via any
>>> type of exchange and can be encoded and decoded in any of the
>>> supported programming languages (C++, Python, Java).
>>>
>>> The XML exchange serves a completely different purpose. It allows
>>> bindings to be created using xquery expressions. Xquery can be run
>>> against the message headers or the message content (if the content
>>> is XML) to determine whether or not to route the message to a
>>> particular queue.
>>>
>>> -Ted
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Rhm-users mailing list
>>> Rhm-users at redhat.com
>>> https://www.redhat.com/mailman/listinfo/rhm-users
>>>
>>
>>
>>
>
More information about the Rhm-users
mailing list