IDispatcherQueueManagerService in assembly SanteDB.Core.Api version 3.0.1980.0
Summary
A service which is responsible for storing messages in a reliable place for dispatching
Description
Whenever SanteDB sends messages to another system using messaging, there is no guarantee that the remote endpoint will be available, or accessable, etc. Therefore all messages which are sent (dispatched) to a remote system are first queued using this wrapper service.
The purpose of the dispatcher queue is the store the outbound message locally in some persistent place, then to notify any listeners that a new message is ready for sending. If the message cannot be sent, then the sending service should place the message back onto the queue or onto a dedicated deadletter queue.
Operations
Operation
Response/Return
Input/Parameter
Description
Open
void
StringqueueName
Opens the specified queue name and enables subscriptions
SubscribeTo
void
StringqueueNameDispatcherQueueCallbackcallback
Subscribes to using
UnSubscribe
void
StringqueueNameDispatcherQueueCallbackcallback
Remove the callback registration
Enqueue
void
StringqueueNameObjectdata
Enqueue the specified data to the persistent queue
Dequeue
DispatcherQueueEntry
StringqueueName
Dequeues the last added item from the persistent queue
/// Example Implementation
using SanteDB.Core.Queue;
/// Other usings here
public class MyDispatcherQueueManagerService : SanteDB.Core.Queue.IDispatcherQueueManagerService {
public String ServiceName => "My own IDispatcherQueueManagerService service";
/// <summary>
/// Opens the specified queue name and enables subscriptions
/// </summary>
public void Open(String queueName){
throw new System.NotImplementedException();
}
/// <summary>
/// Subscribes to using
/// </summary>
public void SubscribeTo(String queueName,DispatcherQueueCallback callback){
throw new System.NotImplementedException();
}
/// <summary>
/// Remove the callback registration
/// </summary>
public void UnSubscribe(String queueName,DispatcherQueueCallback callback){
throw new System.NotImplementedException();
}
/// <summary>
/// Enqueue the specified data to the persistent queue
/// </summary>
public void Enqueue(String queueName,Object data){
throw new System.NotImplementedException();
}
/// <summary>
/// Dequeues the last added item from the persistent queue
/// </summary>
public DispatcherQueueEntry Dequeue(String queueName){
throw new System.NotImplementedException();
}
/// <summary>
/// De-queue a specific message
/// </summary>
public DispatcherQueueEntry DequeueById(String queueName,String correlationId){
throw new System.NotImplementedException();
}
/// <summary>
/// Purge the queue
/// </summary>
public void Purge(String queueName){
throw new System.NotImplementedException();
}
/// <summary>
/// Move an entry from one queue to another
/// </summary>
public DispatcherQueueEntry Move(DispatcherQueueEntry entry,String toQueue){
throw new System.NotImplementedException();
}
/// <summary>
/// Get the specified queue entry
/// </summary>
public DispatcherQueueEntry GetQueueEntry(String queueName,String correlationId){
throw new System.NotImplementedException();
}
public IEnumerable<DispatcherQueueInfo> GetQueues(){
throw new System.NotImplementedException();
}
/// <summary>
/// Get all queue entries
/// </summary>
public IEnumerable<DispatcherQueueEntry> GetQueueEntries(String queueName){
throw new System.NotImplementedException();
}
}