masstransit - Why is my Send only bus not creating a temporary queue? -
for testing request/respond saga masstransit created console application initiate saga sending message on bus (rabbitmq).
according documentation console application not need have endpoints defined receive response.
i create bus following code:
context.bus = bus.factory.createusingrabbitmq(x => { irabbitmqhost host = x.host(new uri(configurationmanager.appsettings["rabbitmqhost"]), h => { h.username("guest"); h.password("guest"); }); });
when above code runs, not seeing exchanges or temporary queue being created.
sending request result result in executing saga responds never come original sender , timeout exception thrown.
sending request:
public async task test(testcontext context) { var triggerrequestmessage = jsonconvert.deserializeobject<triggerrequestmessage>messages.mfamessages.validmessage); var client = createrequestclient(context); var response = await client.request(triggerrequestmessage); logger.log("result: publishmfamessage"); } irequestclient<triggerrequestmessage, responsemessage> createrequestclient(testcontext context) { var serviceaddress = new uri("rabbitmq://localhost/mttest/sagas_authbolton"); var client = context.bus.createrequestclient<triggerrequestmessage, responsemessage>(serviceaddress, timespan.fromseconds(10)); return client; }
what doing wrong? why temporary not being created?
the reason above code didn't create private consumer because wan't starting bus. duhhh!!
the code missing:
context.bus.start();
@travis help!
Comments
Post a Comment