Closed yeowgit closed 6 years ago
Thanks for reporting this. Could you provide some information as to how you registered/created the IBusClientFactory
?
Sorry for the delay.
The app uses Ninject to setup 2 different IBusClient by specifying the detail connection in the binding as below.
Kernel?.Load<RawRabbitModule>();
Bind<RawRabbitOptions>()
.ToConstant(
new RawRabbitOptions
{
ClientConfiguration = config,
Plugins = p => p.UseProtobuf()
});
Then create new IBusClient instance to each queue listener like so...
// message dispatcher
Bind<IFooMessageDispatcher>()
.ToMethod(
x => new FooDispatcher(
x.Kernel.Get<IBusClient>(),
new TopologyConfiguration(m_config.TicketTopology)));
In IFooMessageDispatcher, our own TopologyConfiguration class will have the method to create IPublisherConfigurationBuilder and IConsumerConfigurationBuilder builders. I can provide more detail on each specific builder on how it declare its exchange and queue if required.
Then we use the subscriber as such...
m_client.SubscribeAsync<MyMessageType>(
HandleMessageAsync,
ctx =>
{
m_queueContext = ctx;
ctx.UseSubscribeConfiguration(
c => m_config.UpdateBuilder(c, subscriberName));
});
Alright, thanks for the update. I'll look into this later this week!
Hello @yeowgit - I believe the problem you describe is the same as #301 which is addressed and will be part of the upcoming release!
Hi,
I had this exception thrown today.
[FATAL NLogLogWriter] The service threw an unhandled exception System.DivideByZeroException: Attempted to divide by zero. at RawRabbit.Channel.AutoScalingChannelPool.b__7_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()