What is a protocol? How is it different than message type?

Follow

AMPS messages contain two separate parts: a set of headers processed by AMPS, and the data within the message. The protocol specifies the format of the headers, while the message type specifies the format of the data within the message.

In AMPS 3.X, the server automatically used a protocol identical to the message type.

Starting with 4.0, the AMPS server allows you to have different formats for the protocol and the message type. This change improves AMPS extensibility, and without this change functionality like composite message types and the unparsed binary message type would not be possible.

The change in 4.0 requires applications upgrading from 3.X to add a Protocol element to each Transport in the configuration.

When upgrading an existing AMPS 3.X installation to AMPS 4.0, you can either:

  • Use a protocol that matches the existing message type, which requires no code changes, or

  • Update the applications to use a different protocol

60East recommends using the amps protocol for new applications, and using a protocol that matches the message type (fix, nvfix, xml) for compatibility with existing applications.

 

Updating Configuration Files With Protocol

To specify the Protocol for a Transport, simply add the Protocol block to the transport (as described in the AMPS User Guide and AMPS Configuration Reference).

For example,  consider the following configuration block in 3.X

<Transport>
<Name>nvfix-tcp</Name>
  <Type>tcp</Type>
  <InetAddr>9005</InetAddr>
  <ReuseAddr>true</ReuseAddr>
  <MessageType>nvfix</MessageType>
</Transport>

To continue to use the nvfix protocol for this Transport, add a <Protocol>nvfix</Protocol> declaration, so the configuration becomes:

<Transport>
<Name>nvfix-tcp</Name>
  <Type>tcp</Type>
  <InetAddr>9005</InetAddr>
  <ReuseAddr>true</ReuseAddr>
  <MessageType>nvfix</MessageType>
<Protocol>nvfix</Protocol>
</Transport>

To use the amps protocol for this Transport, add a <Protocol>amps</Protocol> declaration, so the configuration becomes:

<Transport>
<Name>nvfix-tcp</Name>
  <Type>tcp</Type>
  <InetAddr>9005</InetAddr>
  <ReuseAddr>true</ReuseAddr>
  <MessageType>nvfix</MessageType>
<Protocol>amps</Protocol>
</Transport>

 

Updating Client Connection Strings To Match the Protocol

When upgrading an instance of AMPS, if you choose to use the protocol that matches the message type, there is no need to update client connection strings. However, if you change the protocol, you need to update the client connection string to match the new protocol.

For example, the first two configuration blocks in the section above, which use the nvfix protocol, use the same connection string:

tcp://<amps server address>:9005/nvfix

The third configuration block, which uses the amps protocol, uses the following connection string:

tcp://<amps server address>:9005/amps

 

Keywords: upgrade, protocol, messagetype, transport

Have more questions? Submit a request

Comments

  • Avatar
    Lupu, Cristian C - TORONTO

    This page is exactly what I needed to understand the meaning of the new Protocol tag

    Thank you

Powered by Zendesk