Coder Social home page Coder Social logo

christopherread / obvs.netmq Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 6.0 52 KB

NetMQ transport for Obvs

Home Page: http://christopherread.github.io/Obvs

License: MIT License

C# 100.00%
obvs reactive-extensions microservice messaging dotnet zeromq netmq

obvs.netmq's People

Contributors

christopherread avatar megakid avatar sharpe5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

obvs.netmq's Issues

Using `inproc://` precludes the ability to send from an observable callback

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.

No obvious way to set or use `NetMQCertificate` / cryptography.

E.g. https://github.com/zeromq/netmq/blob/master/src/NetMQ.Tests/CurveTests.cs

Excerpt from test:

var serverPair = new NetMQCertificate();
using var server = new DealerSocket();
server.Options.CurveServer = true;
server.Options.CurveCertificate = serverPair;
server.Bind($"tcp://127.0.0.1:55367");

var clientPair = new NetMQCertificate();
using var client = new DealerSocket();
client.Options.CurveServerKey = serverPair.PublicKey;
client.Options.CurveCertificate = clientPair;
client.Connect("tcp://127.0.0.1:55367");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.