Chapter 10. Interoperability This chapter discusses how to use Red Hat build of Apache Qpid ProtonJ2 in combination with other AMQ components. For an overview of the compatibility of AMQ components, see the product introduction . 10.1. Interoperating with other AMQP clients AMQP messages are composed using the AMQP type system . This common format is one of the reasons AMQP clients in different languages are able to interoperate with each other. When sending messages, Red Hat build of Apache Qpid ProtonJ2 automatically converts language-native types to AMQP-encoded data. When receiving messages, the reverse conversion takes place. Note More information about AMQP types is available at the interactive type reference maintained by the Apache Qpid project. Table 10.1. AMQP types AMQP type Description null An empty value boolean A true or false value char A single Unicode character string A sequence of Unicode characters binary A sequence of bytes byte A signed 8-bit integer short A signed 16-bit integer int A signed 32-bit integer long A signed 64-bit integer ubyte An unsigned 8-bit integer ushort An unsigned 16-bit integer uint An unsigned 32-bit integer ulong An unsigned 64-bit integer float A 32-bit floating point number double A 64-bit floating point number array A sequence of values of a single type list A sequence of values of variable type map A mapping from distinct keys to values uuid A universally unique identifier symbol A 7-bit ASCII string from a constrained domain timestamp An absolute point in time Table 10.2. Qpid ProtonJ2 types before encoding and after decoding AMQP type Qpid ProtonJ2 type before encoding Qpid ProtonJ2 type after decoding null null null boolean System.Boolean System.Boolean char System.Char System.Char string System.String System.String binary System.Byte[] System.Byte[] byte System.SByte System.SByte short System.Int16 System.Int16 int System.Int32 System.Int32 long System.Int64 System.Int64 ubyte System.Byte System.Byte ushort System.UInt16 System.UInt16 uint System.UInt32 System.UInt32 ulong System.UInt64 System.UInt64 float System.Single System.Single double System.Double System.Double list Amqp.List Amqp.List map Amqp.Map Amqp.Map uuid System.Guid System.Guid symbol Amqp.Symbol Amqp.Symbol timestamp System.DateTime System.DateTime Table 10.3. Qpid ProtonJ2 and other AMQ client types (1 of 2) Qpid ProtonJ2 type before encoding AMQ C++ type Red Hat build of Rhea type null nullptr null System.Boolean bool boolean System.Char wchar_t number System.String std::string string System.Byte[] proton::binary string System.SByte int8_t number System.Int16 int16_t number System.Int32 int32_t number System.Int64 int64_t number System.Byte uint8_t number System.UInt16 uint16_t number System.UInt32 uint32_t number System.UInt64 uint64_t number System.Single float number System.Double double number Amqp.List std::vector Array Amqp.Map std::map object System.Guid proton::uuid number Amqp.Symbol proton::symbol string System.DateTime proton::timestamp number Table 10.4. Qpid ProtonJ2 and other AMQ client types (2 of 2) Qpid ProtonJ2 Red Hat build of Apache Qpid Proton Python null None System.Boolean bool System.Char proton.char System.String unicode System.Byte[] bytes System.SByte proton.byte System.Int16 proton.short System.Int32 proton.int32 System.Int64 long System.Byte proton.ubyte System.UInt16 proton.ushort System.UInt32 proton.uint System.UInt64 proton.ulong System.Single proton.float32 System.Double float Amqp.List list Amqp.Map dict System.Guid uuid.UUID Amqp.Symbol proton.symbol System.DateTime proton.timestamp 10.2. Interoperating with Red Hat build of Apache Qpid JMS AMQP defines a standard mapping to the JMS messaging model. This section discusses the various aspects of that mapping. For more information, see the Red Hat build of Apache Qpid JMS Interoperability chapter. JMS message types Red Hat build of Apache Qpid ProtonJ2 provides a single message type whose body type can vary. By contrast, the JMS API uses different message types to represent different kinds of data. The table below indicates how particular body types map to JMS message types. For more explicit control of the resulting JMS message type, you can set the x-opt-jms-msg-type message annotation. Table 10.5. Red Hat build of Apache Qpid ProtonJ2 and JMS message types Red Hat build of Apache Qpid ProtonJ2 body type JMS message type System.String TextMessage null TextMessage System.Byte[] BytesMessage Any other type ObjectMessage 10.3. Connecting to AMQ Broker AMQ Broker is designed to interoperate with AMQP 1.0 clients. Check the following to ensure the broker is configured for AMQP messaging: Port 5672 in the network firewall is open. The AMQ Broker AMQP acceptor is enabled. See Default acceptor settings . The necessary addresses are configured on the broker. See Addresses, and Queues . The broker is configured to permit access from your client, and the client is configured to send the required credentials. See Broker Security .

Commands: