EPEX M7 environments and versions | ||
ASIM | PROD | |
(please note that other exchanges using M7 might be running several versions behind) |
When building Copper Power Platform, the requirement for an M7 integration that was clean, usable, and confidence-inspiring led to the creation of Copper M7.
Because of its reliance on
RabbitMQ/AMQP 0.9.1,
a fairly involved messaging protocol, and the requirement of being able to gracefully handle failover,
integrating with EPEX M7 is notoriously difficult.
Copper M7 hides all the messy details, making it possible for developers to focus on developing their own stuff. 🙂
It comes in the form of a few NuGet packages and is built with state-of-the art
.NET 6 / .NET 7 / .NET 8, integrating seamlessly into
Microsoft's generic host.
Tapping into Microsoft's generic host model, starting your
robust M7-powered integration service is just as easy as calling an
extension method on your IServiceCollection
.
The use of idiomatic C#/.NET constructs makes Copper M7 easily approachable to all .NET developers.
Doing the initial sync is done simply by providing a callback. Copper M7 will call it during startup, and subsequently whenever it is required.
Broadcast messages get dispatched to the broadcast dispatcher function.
Copper M7 guarantees that you'll receive broacast messages in the correct order.
All message types are represented as C# classes. In addition to this, types are marked with interfaces, classifying
messages as one or more of
IInquiryRequest
,
IInquiryResponse
,
IManagementRequest
,
IManagementResponse
,
IBroadcastMessage
,
AND finally all requests are marked with their return types, e.g. TradeCaptureReq
is marked with IReturn<TradeCaptureRprt>
This enables Copper M7 to validate that request/response types match, before anything is sent to EPEX M7.
Copper M7 automatically retrieves and caches relevant entities, keeping them updated in the background.
They can be accessed via dedicated helpers, e.g. IContractHelper
, which may be used to easily
get contract information.
Currently, there are caches for system info, products, contracts, order book (private), and contract order books (i.e. all public orders/full market depth).
Handlers for initial sync and broadcast message processing can be registered with services.AddInitialSyncHandler<>
and
services.AddBroadcastHandler<>
, e.g. services.AddBroadcastHandler<TradeCaptureRprtHandler>();
for full dependency injection support.