-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When using the inproc:// protocol, it is not possible to e.g. Publish when inside an observable context.
Setup
var serviceBus = ServiceBus
.Configure()
.WithNetMqEndpoints<IMyServiceMessage>()
.Named("MyService")
.BindToAddress("inproc://test")
.OnPort(default)
.SerializedAsNetJson()
.AsClientAndServer()
.UsingConsoleLogging()
.Create()
;
return serviceBus;then
bus.Commands.Subscribe(
async (c) =>
{
Console.WriteLine("RECV(COMMAND): {0}", c.GetType().Name);
Console.WriteLine("sending event");
await bus.PublishAsync(new MyEvent($"OK: {c}")).GetAwaiter().GetResult();
}
);also
bus.Events.Subscribe(
(e) =>
{
_logger.LogInformation("RECV(EVENT): {e}", e);
});When sending a command, no event will be publised received.
RECV(COMMAND): MyCommand { Counter = 0 }
sending event
Sending command
sending event
RECV(COMMAND): MyCommand { Counter = 1 }
Probably because commands and events (and requests and responses) assumes they are on different ports, which they aren't in this scenario.
I guess this is a wontfix type issue, but it might be good to point out in the README, maybe.
Nevertheless, I'd like to thank you for a great library.
Metadata
Metadata
Assignees
Labels
No labels