Coder Social home page Coder Social logo

rebussamples's Introduction

Welcome to the Rebus Samples repository

Check out

  • Time printer - simple program that sends a message to itself every second
  • Email sender - simple email sender that functions as a good example on how to queue up work
  • Native Pub/sub sample - demonstrates how pub/sub can be wired up when the transport has native support for it (in this case using Azure Service Bus)
  • Centralized Pub/sub sample - demonstrates how pub/sub can be wired up, using SQL Server as a "centralized subscription storage"
  • Pub/sub sample - demonstrates how pub/sub can be wired up
  • Integration sample - demonstrates how calling an external web service can be made more robust
  • Unit of work sample - demonstrates how a proper unit of work can be hooked into Rebus in all the right places
  • Rabbit MQ topics sample - demonstrates how Rebus' low-level topics API can be used with the RabbitMQ transport to do pub/sub with wildcards
  • OWIN Web Host - demonstrates how Rebus can be configured to host an OWIN endpoint
  • Showdown - sample that can send/receive a bunch of messages and measure the time it takes
  • Sagas - sample that shows a saga
  • SimpleInjector - sample that shows how SimpleInjector works with Rebus
  • Logging - sample with various types of logging
  • SqlAllTheWay - sample that demonstrates "exactly once delivery" with SQL transport and user work enlisted in same transaction
  • MessageBus - demonstrates how tree totally independent endpoints can do pub/sub with a central database being their only connection
  • RequestReply - demonstrates how a client can send a request to a server, which then can reply back to the client
  • SharedNothing - demonstrates how a publisher and a subscriber can communicate without sharing class libraries or anything

Scaleout samples

  • Rabbit scaleout - demonstrates how work can be easily distributed among a cluster of workers when working with RabbitMQ
  • SQL Server scaleout - demonstrates how work can be easily distributed among a cluster of workers when working with SQL Server as the transport
  • PostgreSQL scaleout - demonstrates how work can be easily distributed among a cluster of workers when working with PostgreSQL as the transport

F# Samples

  • Onboarding saga - demonstrates how to work with Rebus in F#, showing an entry-point Web API and a backend saga with a timeout and compensating actions.

Deprecated

  • User context sample - shows how an ambient user context can be passed along with messages
  • MSMQ scaleout - demonstrates how work can be distributed among a cluster of workers when working with MSMQ and Rebus' MSMQ distributor

rebussamples's People

Contributors

jmkelly avatar kendallb avatar mookid8000 avatar patrick11994 avatar riezebosch avatar seankearon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rebussamples's Issues

Request to update RequestReply example to Rebus 6.4.1

Greetings Mogens,

I have been trying out a few of the RebusSamples and found the some of them are using older versions of various Rebus packages.

Could you perhaps update the
https://github.com/rebus-org/RebusSamples/tree/master/RequestReply#requestreply
sample to Rebus 6.4.1 as there has been numerous improvements to the framework.

Incidentally, I had stumbled upon this issue :
rebus-org/Rebus.Async#3 and noticed that you suggested using bus.SendRequest<Reply> .

Can you enhance the sample to use SendRequest as well ?

Thanks.

Usage of UseRabbitMqAsOneWayClient() Bus across Threads

Hi,

I've been reading https://github.com/rebus-org/Rebus/wiki/Thread-safety-and-instance-policies, but didn't come across any advice regarding the use of UseRabbitMqAsOneWayClient() across multiple threads.

I have an application that consumes from RabbitMQ using the follow Bus instance which is a singleton instance for the lifetime of the application:

protected override IBus InternalCreateBus(string endpoint = null)
{
    return Configure.With(Activator)
        .Transport(t => t
            .UseRabbitMq(ConnectionString, _source)
            .ExchangeNames(ExchangeName + "Direct", ExchangeName)
            .Prefetch(_options.Prefetch))
        .Serialization(a => a.UseNewtonsoftJson(JsonInteroperabilityMode.PureJson))
        .Options(oc =>
        {
             oc.SimpleRetryStrategy(_options.ErrorQueueName, _options.RetryCount, errorDetailsHeaderMaxLength: _maxErrorLength);
             oc.SetNumberOfWorkers(_options.WorkerCount);
             oc.SetMaxParallelism(_options.MaxParallelism ?? _options.WorkerCount);
        })
        .Start();
}

In the same application the workers that are instantiated by the Bus declared above all need to be able to publish to RabbitMQ.

Is it safe for all of these workers to share the same singleton publish bus instance declared in the following way:

protected override IBus InternalCreateBus(string endpoint = null)
{
    return Configure.With(Activator)
        .Transport(t => t
            .UseRabbitMqAsOneWayClient(ConnectionString)
            .ExchangeNames(ExchangeName + "Direct", ExchangeName))
        .Serialization(a => a.UseNewtonsoftJson(JsonInteroperabilityMode.PureJson))
        .Start();
}

Or is a separate publishing bus required for each worker?

Hope you you can help!

Q: Can't receive messages when object published is not exactly the same shared

When trying to solve my issue with not receiving messages, I tried playing with this sample: "https://github.com/rebus-org/RebusSamples/tree/master/PubSubNative" and found that the object, which is published from the publisher to the subscribers, have to be the exact same shared object "StringMessage". It does not work when I create classes by the same name and properties in each project. I like it to not have the shared files but have their own classes - if it's possible?

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.