public class RecoveryManagerImpl extends Object implements RecoveryManager, EventRecoveryRequestIssuer, RabbitMqSystemListener
RecoveryManager used to manage recovery operations| Modifier and Type | Method and Description |
|---|---|
void |
handleRecovery(com.rabbitmq.client.Recoverable recoverable)
This method gets invoked by the RabbitMQ library when the auto-recovery kicks-in
|
void |
handleRecoveryStarted(com.rabbitmq.client.Recoverable recoverable) |
void |
handleTopologyRecoveryStarted(com.rabbitmq.client.Recoverable recoverable) |
Long |
initiateEventOddsMessagesRecovery(Producer producer,
Urn eventId)
Initiates a odds recovery procedure for the event associated with the provided
Urn identifier on the requested Producer
(The odds recovery procedure re-sends all odds for all markets for a sport event)
Note: The event must be either EventStatus.NotStarted or EventStatus.Live |
Long |
initiateEventStatefulMessagesRecovery(Producer producer,
Urn eventId)
Initiates a stateful recovery procedure for the event associated with the provided
Urn identifier on the requested Producer
(The stateful message recovery procedure re-sends all stateful-messages (BetSettlement, RollbackBetSettlement, BetCancel, UndoBetCancel) for a sport event)
Note: The event can be up to 30 days in the past |
void |
onAliveReceived(int producerId,
long aliveGenTimestamp,
long receivedTimestamp,
boolean subscribed,
boolean isSystemSession)
Method invoked when the message of type "Alive" is received
|
void |
onMessageProcessingEnded(int uniqueMessageProcessorIdentifier,
int producerId,
Long processedMessageGenTimestamp,
String eventId)
Method invoked when the AMQP message processing ended
|
void |
onMessageProcessingStarted(int uniqueMessageProcessorIdentifier,
int producerId,
Long requestId,
long now)
Method invoked when the AMQP message processing started
|
void |
onSnapshotCompleteReceived(int producerId,
long nowTimestamp,
long requestId,
MessageInterest sessionMessageInterest)
Method invoked when the message of type "SnapshotComplete" is received
|
void |
requestManualProducerRecovery(int id,
long timestampForRecovery) |
void |
shutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause)
This method is called when the AMQP channel gets shut down/disconnect detected
|
public void onMessageProcessingStarted(int uniqueMessageProcessorIdentifier,
int producerId,
Long requestId,
long now)
RecoveryManageronMessageProcessingStarted in interface RecoveryManageruniqueMessageProcessorIdentifier - a unique representation of the message processor invoking the methodproducerId - the source producer of the messagerequestId - the recovery request id of the message (if present)now - the current timestamppublic void onMessageProcessingEnded(int uniqueMessageProcessorIdentifier,
int producerId,
Long processedMessageGenTimestamp,
String eventId)
RecoveryManageronMessageProcessingEnded in interface RecoveryManageruniqueMessageProcessorIdentifier - a unique representation of the message processor invoking the methodproducerId - the source producer of the messageprocessedMessageGenTimestamp - the generated timestamp of the processed messageeventId - the eventId associated with feed message (if present)public void onAliveReceived(int producerId,
long aliveGenTimestamp,
long receivedTimestamp,
boolean subscribed,
boolean isSystemSession)
RecoveryManageronAliveReceived in interface RecoveryManagerproducerId - the producer which generated the Alive messagealiveGenTimestamp - the message generation timestampreceivedTimestamp - the timestamp of when the message was receivedsubscribed - an indication if the Alive message was sent from a producer that the SDK is subscribed toisSystemSession - an indication if the alive was received on the system sessionpublic void onSnapshotCompleteReceived(int producerId,
long nowTimestamp,
long requestId,
MessageInterest sessionMessageInterest)
RecoveryManageronSnapshotCompleteReceived in interface RecoveryManagerproducerId - the producer which generated the Alive messagenowTimestamp - the timestamp of when the message was receivedrequestId - the request id that is the cause of the SnapshotCompletesessionMessageInterest - the message interest of the session that received the messagepublic Long initiateEventOddsMessagesRecovery(Producer producer, Urn eventId)
EventRecoveryRequestIssuerUrn identifier on the requested Producer
(The odds recovery procedure re-sends all odds for all markets for a sport event)
Note: The event must be either EventStatus.NotStarted or EventStatus.LiveinitiateEventOddsMessagesRecovery in interface EventRecoveryRequestIssuerproducer - the producer on which the recovery should be initializedeventId - the Urn identifier of the event for which the recovery is neededpublic Long initiateEventStatefulMessagesRecovery(Producer producer, Urn eventId)
EventRecoveryRequestIssuerUrn identifier on the requested Producer
(The stateful message recovery procedure re-sends all stateful-messages (BetSettlement, RollbackBetSettlement, BetCancel, UndoBetCancel) for a sport event)
Note: The event can be up to 30 days in the pastinitiateEventStatefulMessagesRecovery in interface EventRecoveryRequestIssuerproducer - the producer on which the recovery should be initializedeventId - the Urn identifier of the event for which the recovery is neededpublic void handleRecovery(com.rabbitmq.client.Recoverable recoverable)
handleRecovery in interface com.rabbitmq.client.RecoveryListenerpublic void handleRecoveryStarted(com.rabbitmq.client.Recoverable recoverable)
handleRecoveryStarted in interface com.rabbitmq.client.RecoveryListenerpublic void handleTopologyRecoveryStarted(com.rabbitmq.client.Recoverable recoverable)
handleTopologyRecoveryStarted in interface com.rabbitmq.client.RecoveryListenerpublic void shutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause)
shutdownCompleted in interface com.rabbitmq.client.ShutdownListenerpublic void requestManualProducerRecovery(int id,
long timestampForRecovery)
Copyright © 2016–2025. All rights reserved.