示例#1
0
        /// <summary>
        /// Listen for incoming messages at the designated Rabbit MQ queue by name
        /// </summary>
        /// <param name="endpoints"></param>
        /// <param name="queueName">The name of the Rabbit MQ queue</param>
        /// <returns></returns>
        public static RabbitMqListenerConfiguration ListenToRabbitQueue(this IEndpoints endpoints, string queueName)
        {
            var endpoint = endpoints.RabbitMqTransport().EndpointForQueue(queueName);

            endpoint.IsListener = true;
            return(new RabbitMqListenerConfiguration(endpoint));
        }
示例#2
0
 /// <summary>
 /// Configure connection and authentication information about the Rabbit MQ usage
 /// within this Jasper application
 /// </summary>
 /// <param name="endpoints"></param>
 /// <param name="configure"></param>
 public static void ConfigureRabbitMq(this IEndpoints endpoints, Action <IRabbitMqTransport> configure)
 {
     configure(endpoints.RabbitMqTransport());
 }