Eurex Clearing Messaging Interfaces – Connectivity B: AMQP
Total Page:16
File Type:pdf, Size:1020Kb
Eurex Clearing Eurex Clearing Messaging Interfaces Connectivity B: AMQP Programming Guide © Eurex 2020 Deutsche Börse AG (DBAG), Clearstream Banking AG (Clearstream), Eurex Frankfurt AG, Eurex Clearing AG (Eurex Clearing) and Eurex Repo GmbH (Eurex Repo) are corporate entities and are registered under German law. Clearstream Banking S.A. is a corporate entity and is registered under Luxembourg law. Deutsche Boerse Asia Holding Pte. Ltd., Eurex Clearing Asia Pte. Ltd. and Eurex Exchange Asia Pte. Ltd are corporate entities and are registered under Singapore law. Eurex Frankfurt AG (Eurex) is the administrating and operating institution of Eurex Deutschland. Eurex Deutschland is in the following referred to as “Eurex Exchange”. All intellectual property, proprietary and other rights and interests in this publication and the subject matter hereof (other than certain trademarks and service marks listed below) are owned by DBAG and its affiliates and subsidiaries including, without limitation, all patent, registered design, copyright, trademark and service mark rights. While reasonable care has been taken in the preparation of this publication to provide details that are accurate and not misleading at the time of publication DBAG, Clearstream, Eurex, Eurex Clearing, Eurex Repo as well as Eurex Exchange and their respective servants and agents (a) do not make any representations or warranties regarding the information contained herein, whether express or implied, including without limitation any implied warranty of merchantability or fitness for a particular purpose or any warranty with respect to the accuracy, correctness, quality, completeness or timeliness of such information, and (b) shall not be responsible or liable for any third party’s use of any information contained herein under any circumstances, including, without limitation, in connection with actual trading or otherwise or for any errors or omissions contained in this publication. This publication is published for information purposes only and shall not constitute investment advice respectively does not constitute an offer, solicitation or recommendation to acquire or dispose of any investment or to engage in any other transaction. This publication is not intended for solicitation purposes but only for use as general information. All descriptions, examples and calculations contained in this publication are for illustrative purposes only. Eurex and Eurex Clearing offer services directly to members of Eurex Exchange respectively to clearing members of Eurex Clearing. Those who desire to trade any products available on the Eurex market or who desire to offer and sell any such products to others or who desire to possess a clearing license of Eurex Clearing in order to participate in the clearing process provided by Eurex Clearing, should consider legal and regulatory requirements of those jurisdictions relevant to them, as well as the risks associated with such products, before doing so. Only Eurex derivatives that are CFTC-approved may be traded via direct access in the United States or by United States persons. A complete, up-to-date list of Eurex derivatives that are CFTC- approved is available at: http://www.eurexchange.com/exchange-en/products/eurex-derivatives- us. In addition, Eurex representatives and participants may familiarise U.S. Qualified Institutional Buyers (QIBs) and broker-dealers with certain eligible Eurex equity options and equity index options pursuant to the terms of the SEC’s July 1, 2013 Class No-Action Relief. A complete, up- to-date list of Eurex options that are eligible under the SEC Class No-Action Relief is available at: http://www.eurexchange.com/exchange-en/products/eurex-derivatives-us/eurex-options-in-the- us-for-eligible-customers. Lastly, U.S. QIBs and broker-dealers trading on behalf of QIBs may trade certain single-security futures and narrow-based security index futures subject to terms and conditions of the SEC’s Exchange Act Release No. 60,194 (June 30, 2009), 74 Fed. Reg. 32,200 (July 7, 2009) and the CFTC’s Division of Clearing and Intermediary Oversight Advisory Concerning the Offer and Sale of Foreign Security Futures Products to Customers Located in the United States (June 8, 2010). Trademarks and Service Marks Buxl®, DAX®, DivDAX®, eb.rexx®, Eurex®, Eurex Repo®, Eurex Strategy WizardSM, Euro GC Pooling®, FDAX®, FWB®, GC Pooling®,,GCPI®, MDAX®, ODAX®, SDAX®, TecDAX®, USD GC Pooling®, VDAX®, VDAX-NEW® and Xetra® are registered trademarks of DBAG. All MSCI indexes are service marks and the exclusive property of MSCI Barra. ATX®, ATX® five, CECE® and RDX® are registered trademarks of Vienna Stock Exchange AG. IPD® UK Quarterly Indexes are registered trademarks of Investment Property Databank Ltd. IPD and have been licensed for the use by Eurex for derivatives. SLI®, SMI® and SMIM® are registered trademarks of SIX Swiss Exchange AG. The STOXX® indexes, the data included therein and the trademarks used in the index names are the intellectual property of STOXX Limited and/or its licensors Eurex derivatives based on the STOXX® indexes are in no way sponsored, endorsed, sold or promoted by STOXX and its licensors and neither STOXX nor its licensors shall have any liability with respect thereto. Bloomberg Commodity IndexSM and any related sub-indexes are service marks of Bloomberg L.P. PCS® and Property Claim Services® are registered trademarks of ISO Services, Inc. Korea Exchange, KRX, KOSPI and KOSPI 200 are registered trademarks of Korea Exchange Inc. The names of other companies and third party products may be trademarks or service marks of their respective owners. Eurex Clearing Messaging Interfaces Connectivity Eurex Clearing B: AMQP Programming Guide As of 21.10.20 Page 4 of 61 Abstract This document provides information about the connectivity for the AMQP based Eurex Clearing FIXML Interface, Eurex Clearing FpML Interface and Eurex Clearing Margin Calculator Interface. This document is intended to be a guide to Members developing applications, which will utilize this interface. Keywords Eurex Clearing FIXML Interface, Eurex Clearing FpML Interface, Eurex Clearing Margin Calculator Interface, Advanced Message Queuing Protocol, AMQP, Clearing, FIXML, FpML, XML, Development guide, Java, C++, .NET Eurex Clearing Messaging Interfaces Connectivity Eurex Clearing B: AMQP Programming Guide As of 21.10.20 Page 5 of 61 Table of Contents 1 Introduction 8 1.1 Overview 8 1.1.1 Eurex Clearing FIXML Interface 8 1.1.2 Eurex Clearing FpML Interface 8 1.1.3 Eurex Clearing Margin Calculator Interface 8 1.1.4 Eurex Clearing Trade Entry Interface 8 1.1.5 AMQP 8 1.1.6 FIXML 9 1.1.7 FpML 9 1.2 Intended audience 9 1.3 Eurex Clearing Messaging Interface Connectivity documentation 10 1.4 Eurex Clearing FIXML Interface documentation 10 1.5 Eurex Clearing FpML Interface, Margin Calculator Interface and Trade Entry Interface documentation 11 1.6 Conventions used in this document 11 1.7 Examples used in this document 11 1.8 Organization of this document 11 1.9 Code examples 12 2 Obtaining the AMQP client API 13 2.1 Apache Qpid 13 2.2 SwiftMQ AMQP 1.0 Java client 14 2.3 AMQP.NET Lite client 14 2.4 Vert.x 3 14 2.5 Upgrading client libraries 15 3 Java 16 3.1 SSL / TLS Certificates 16 3.1.1 Client certificate 16 3.1.2 Broker public keys 17 3.1.3 SSL / TLS debugging 18 3.2 JMS 18 3.2.1 Java Naming and Directory Interface (JNDI) 19 3.2.2 Preparing connection and session 19 3.2.3 Creating a receiver/sender 20 3.2.4 Starting the connection 21 3.2.5 Thread safety 21 3.2.6 Receiving/sending messages 22 3.2.6.1 Preparing a request message 22 Eurex Clearing Messaging Interfaces Connectivity Eurex Clearing B: AMQP Programming Guide As of 21.10.20 Page 6 of 61 3.2.6.2 Sending a request message 22 3.2.6.3 Receiving a message using Message listener 23 3.2.6.4 Receiving a message using the receive() method 23 3.2.6.5 Message processing 24 3.2.7 Closing the connection 25 3.2.8 Error handling 25 3.3 Apache Qpid JMS client for AMQP 1.0 27 3.3.1 Connection Factory 27 3.3.2 Connection URI 27 3.3.3 Addresses 29 3.3.3.1 Receiving responses to requests 30 3.3.3.2 Sending requests 30 3.3.3.3 “ReplyTo” address in requests 30 3.3.3.4 Receiving broadcasts 31 3.3.4 Performance 31 3.3.4.1 Receive pre-fetching 31 3.3.4.2 Message acknowledgement 32 3.3.4.3 Sender synchronization 32 3.3.5 Logging 33 3.4 SwiftMQ AMQP 1.0 client 34 3.4.1 SSL Client Authentication 34 3.4.2 Preparing connection and session 36 3.4.3 Creating consumer and producer 37 3.4.4 Sending messages 38 3.4.5 Receiving messages 38 3.4.6 Closing the connection 39 3.4.7 Logging 39 4 C++ 40 4.1 Environment setup under Linux 40 4.2 Environment setup under Windows 42 4.3 Specifying the destination (addresses) 43 4.3.1.1 Receiving responses to requests 43 4.4 Preparing connection and session 44 4.4.1 Auto reference handling 45 4.5 Creating a receiver/sender 45 4.6 Thread safety 47 4.7 Receiving/sending messages 47 4.7.1 Preparing a request message 47 4.7.2 Sending a request message 47 4.7.3 Receiving a message 48 4.7.4 Message processing 48 4.8 Closing the connection 48 Eurex Clearing Messaging Interfaces Connectivity Eurex Clearing B: AMQP Programming Guide As of 21.10.20 Page 7 of 61 4.9 Compilation and linking on the Linux operating system 49 4.10 Compilation and linkage under the Windows operating system 49 4.11 Logging 49 4.12 Error handling 50 4.13 Performance 51 4.13.1 Receive pre-fetching 51 4.13.2 Message acknowledgement 51 4.13.3 Sender synchronization 52 5 .NET 53 5.1 Apache Qpid Messaging API 53 5.2 AMQP.NET