Skip to content

Review of connection and model handling #1

@simoneb

Description

@simoneb

Hey gimmi,

unless I'm missing something about how log4net works I believe that the way you handle the model is not completely right, as the RMQ .NET client implements the model in a way that is not thread-safe, therefore you should not share the model among different threads.
I'm not suggesting you create a new model every time you have to log something either - although models are lightweight in the .NET implementation it is still not advisable to create too many of them on a single connection. Instead I'd suggest you set up a producer-consumer model using perhaps the thread-safe collections in .NET and on the producer side just enqueue data from the logger while using a single model on the consumer side to publish that to RMQ.

For more details about RMQ .NET client behavior I suggest you look at the API documentation, it's very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions