Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 21 02:50

    christopherread on master

    Removed log4net and updated Obv… (compare)

  • Oct 20 20:30
    christopherread milestoned #40
  • Oct 20 20:30
    christopherread assigned #41
  • Oct 20 20:30
    christopherread labeled #41
  • Oct 20 20:30
    christopherread milestoned #41
  • Oct 20 20:30
    christopherread opened #41
  • Oct 20 20:28
    christopherread opened #40
  • Oct 20 20:28
    christopherread review_requested #40
  • Oct 20 20:28
    christopherread assigned #40
  • Oct 20 20:26

    christopherread on subject-service-bus

    Removed Subscribe() from IServi… (compare)

  • Oct 20 20:09

    christopherread on subject-service-bus

    ServiceBus now uses an IService… (compare)

  • Oct 20 19:18

    christopherread on subject-service-bus

    Introduce new AllMessages optio… (compare)

  • Oct 18 23:18

    christopherread on master

    Update Obvs.RabbitMQ.sln (compare)

  • Oct 18 18:26

    christopherread on master

    Minor dependency updates, misse… (compare)

  • Oct 18 18:21

    christopherread on master

    Minor dependency updates (compare)

  • Oct 18 03:19
    christopherread closed #39
  • Oct 18 03:12

    christopherread on master

    Update appveyor.yml (compare)

  • Oct 18 03:03

    christopherread on master

    Updated to Obvs 5.0 (compare)

  • Sep 27 11:02

    megakid on master

    Added publicly visible interfac… Merge pull request #20 from pet… (compare)

  • Sep 27 11:02
    megakid closed #20
Christopher Read
@christopherread
@ankorus the requesterId string is sent as a message property, to be used on the response, and vice versa
@ankorus it is being added to prevent your process from receiving responses for requests it didn't send, obviously ;)
all this is handled under the covers by Obvs, your scenario of trying to reverse engineer it in C++ process should work, but it is not designed for this, or supported
Christopher Read
@christopherread
but, perhaps if you're experiments are successful, you could port Obvs, Obvs.RabbitMQ, and Obvs.Serialization.Protobuf to C++ and put them on github
Andy Weston
@westonsoftware
Hi, I would like to send an ICommand that gets picked up by a single worker, can I use Obvs.NetMQ to do this? like UsingQueueFor<ICommand>() ?
ankorus
@ankorus
Next iteration of dll hell trying to use obvs client bus from .net fw 4.7.2. The app is referencing Sytem.Reactive, System.Reactive.Core and System.Reactive.Linq via nuget. All three of version 4.2.0 pre 560. System.Reactive is getting installed of requested v.4.2.0. However System.Reactive.Core and System.Reactive.Linq are getting installed of v.3.0.3. Creating service bus client the app is getting exception: Cannot load System.Reactive.Core v.3.0.1. ?! Anyone knows how to resolve this one?
Andy Weston
@westonsoftware
try adding System.Reactive.Compatibility ? I recently had to do something like this
@ankorus
ankorus
@ankorus
@westonsoftware Just tried System.Reactive.Compatibility which loaded 7 other dlls. Unfortunately it did not help. The exception is claiming that obvs.rabbitmq needs System.Reactive.Core 3.0.1. I have 3.0.3. It is interesting that my end-to-end fw unit tests run fine with the settings I have on the same server.
ankorus
@ankorus
@christopherread Could it be that obvs.rabbitmq was build somehow explicitly referencing system.reactive.core v.3.0.1 for framework? Otherwise I am wondering what else can require system.reactive.core v.3.0.1 if this version is not even in nuget.
ankorus
@ankorus
OK I found the issue. The output dll is getting generated with dll.config which has assembly binding section which includes system.reactive.core:
  <dependentAssembly>
    <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
  </dependentAssembly>
For some reasons the calling exe is ignoring this dll.config. After copying assembly binding section into exe.config it started to work. I would appreciate an advise on how to avoid this section copy deploying dll.
ankorus
@ankorus
We have our dll which runs by exe not developed by us. When our dll is called it configures service bus, sends request and gets response. The code for configuration and getting responses is provided above.
If it is getting called too often it receives the following exception:
The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=405, text="RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'ABCServiceObvs.Responses-VM-SRV01-SYSTEM-4004-1' in vhost '/'. It could be originally declared on another connection or the exclusive property value does not match that of the or...", classId=50, methodId=10, cause=
Here is the call stack:
at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
at RabbitMQ.Client.Impl.ModelBase.QueueDeclare(String queue, Boolean passive, Boolean durable, Boolean exclusive, Boolean autoDelete, IDictionary2 arguments) at RabbitMQ.Client.Impl.AutorecoveringModel.QueueDeclare(String queue, Boolean durable, Boolean exclusive, Boolean autoDelete, IDictionary2 arguments)
at Obvs.RabbitMQ.MessageSource1.<get_Messages>b__10_0(IObserver1 observer)
at System.Reactive.Linq.QueryLanguage.CreateWithDisposableObservable1.SubscribeCore(IObserver1 observer)
at System.Reactive.ObservableBase1.Subscribe(IObserver1 observer)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)
at System.Reactive.Linq.QueryLanguage.LastOrDefaultInternalTSource
ankorus
@ankorus
What is the best solution or work around of the problem?
@christopherread Chris, can obvs rabbitmq queue be configured as non exclusive? Thx,
Christopher Read
@christopherread
@ankorus RabbitMQ uses exchanges and subscriber queues
the queues are unique to each subscription

@ankorus check out the MessageSource code here to better understand how Obvs subscriptions to RabbitMQ are implemented:

https://github.com/christopherread/Obvs.RabbitMQ/blob/master/Obvs.RabbitMQ/MessageSource.cs

Christopher Read
@christopherread

@westonsoftware Hi Andy, welcome!

In answer to your question, no that isn't possible. The reason being that Obvs.NetMQ doesn't implement this (I think I only implemented for Obvs.ActiveMQ).

Christopher Read
@christopherread

@westonsoftware the NetMQ transport does support queues it seems:
https://netmq.readthedocs.io/en/latest/queue/

So it would be a matter of porting + testing the code from Obvs.ActiveMQ to Obvs.NetMQ

ankorus
@ankorus
@christopherread How to resolve AMQP operation issue?
Christopher Read
@christopherread

@ankorus I suspect you have a concurrency issue: the caller of your DLL is making multiple calls to your DLL from within the same process that at times overlap

this causes more than one subscription on the RabbitMQ response subscription queue, thats only supposed to have one subscription, hence the error

the solution is to first ensure your code is only instantiating the Obvs ServiceBus so the response queue is only subscribed to once

Christopher Read
@christopherread
Obvs is designed to have a ServiceBus singleton that is instantiated once at start of process and disposes when process exits
ankorus
@ankorus
@christopherread This is regular single server - multiple clients case. We need multiple clients send requests of the same type and get responses of the same type. Server singleton is fine. Singleton for all clients is a stretch. If each client queue name will be different (there was my earlier question on this subject) would the issue be resolved? Or the issue is fundamental and all clients must seat on the same response queue by design?
ankorus
@ankorus
@christopherread I will convert client bus to singleton. Is there a way to find out that the bus it is closed or disposed and needs to recreated? IServiceBusClient does not expose methods for that. Another thought: after serviceBusClient.GetResponses is there a way to stop getting responses or each client will keep getting responses forever from the singleton bus?
Christopher Read
@christopherread
Singleton within a process
Multiple client processes is fine, one ServiceBus per process
ankorus
@ankorus
Even with one single DLL and service bus - singleton (meaning not re-creating) still getting AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=405, text="RESOURCE_LOCKED - cannot obtain exclusive access to locked queue.
Christopher Read
@christopherread
Check your RabbitMQ admin console to see if you can see the subscribers listed
ankorus
@ankorus
Using rabbitmq admin I can see exchange named like a bus, and 2 queues: for requests and commands. Don't see queue for responses. When I am invoking our functions using UI I can see the number of connections is constantly growing. We use blocking wait currently to get single reponse:
response = serviceBusClient.GetResponses(request)
.SkipWhile(res => res.RequestId != request.RequestId)
.Take(1)
.Single()
ankorus
@ankorus
Found the bug: our singleton was still recreating client bus. The fact that there is no queue for responses is due to not using subscribe.
Christopher Read
@christopherread
Great!
Christopher Read
@christopherread
@ankorus I should be able to make a change so that Rabbit subscriber queue names are always unique, so you don't get errors when you don't have a singleton bus.
@ankorus you don't need to check the requestId on the response, that's done under the covers, but you do need to complete using Take(1) or dispose of your response subscription
ankorus
@ankorus
Let's start with server side. Do we really need process id in the queue name? What is the use case? Multiple obvs servers, yet still the same rabbitmq server? How to find process id by remote client?
For callbacks, I guess, unique queue name is cool. Especially if non-obvs and non-even-c# clients may get it...
Yes, please, show, how to dispose GetResponses correctly. I don't think there are good examples...
Christopher Read
@christopherread
Take(1) will be fine, it will complete afterwards