Can the NServiceBus distributor report progress from workers? -


i investigating nservicebus , unsure how (or if) use handle scenario:

i have multiple clients sending work requests, distributor farms out workers. work take long time complete , workers report progress client sent original request.

i have looked @ full duplex sample , how add distributor sample. i've got these working, when modify them reply series of progress messages (with delay between messages, per code shown below), client receives progress messages @ same time.

public class requestdatamessagehandler : ihandlemessages<requestdatamessage> {     public ibus bus { get; set; }      public void handle(requestdatamessage message)     {         (var = 0; < 10; i++)         {             var count = i;             var response = this.bus.createinstance<dataresponsemessage>(m =>                 {                     m.dataid = message.dataid;                     m.progress = count * 10;                 });              this.bus.reply(response);              thread.sleep(1000);         }     } } 

i suspect i've not understood basic how nservicebus works. explain i've gone wrong, or point me @ examples and/or documentation?

what have constructed send messages part of same transaction. since there 1 transaction per handler, won't able communicate progress way. have have separate endpoint each chunk of processing communicate progress. we've implemented communicating progress updating externally not involved in transaction. done sending non-transactional message endpoint update progress or rpc call. there have poll progress data store.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -