GithubHelp home page GithubHelp logo

jaapyang / books Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.2 MB

日常学习资料或者文章收集

License: Apache License 2.0

Python 11.48% Batchfile 0.01% C# 37.16% CSS 32.24% JavaScript 16.25% HTML 2.86%

books's People

Contributors

jaapyang avatar

Stargazers

 avatar  avatar

Watchers

 avatar

books's Issues

C#能连接到RabbitMQ,但不能正确触发消息到达并消费的事件

  • 通过观察RabbitMQ的状态,发现消息已经被C#接收
  • C#已经启动消息接受,但不能触发消息到达的事件

···
void HandlerRecivedMessage(string hostName, string queuename, Action<object, BasicDeliverEventArgs> callBack)
{
var facotry = new ConnectionFactory { HostName = hostName };

using (var connection = facotry.CreateConnection())
using (var channel = connection.CreateModel())
{
    channel.QueueDeclare(queue: queuename,
        durable: false,
        exclusive: false,
        autoDelete: false,
        arguments: null);

    var consumer = new EventingBasicConsumer(channel);

    consumer.Received += (m, e) => callBack(m, e);

    channel.BasicConsume(queue: queuename,
        autoAck: true,
        consumer: consumer);
}
Console.WriteLine(@"开始信息处理....");
Console.ReadLine();

}
···

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.