【问题标题】:MassTransit Consumer - Send from phpMassTransit 消费者 - 从 php 发送
【发布时间】:2017-01-30 16:04:55
【问题描述】:

我想为 php 开发人员指定如何发送将由 MassTransit C# 消费者使用的消息(MassTransit 文档中的命令)。

确保消息被消费的最低要求是什么?

【问题讨论】:

    标签: masstransit


    【解决方案1】:

    您需要将消息形成为正确的 JSON 文档,如下所示:

    {
        "destinationAddress": "rabbitmq://localhost/input_queue",
        "headers": {},
        "message": {
            "value": "Some Value",
            "customerId": 27
        },
        "messageType": [
            "urn:message:MassTransit.Tests:ValueMessage"
        ]
    }
    

    这些字段构成消息文档,未使用的字段不序列化:

    string MessageId
    string CorrelationId
    string ConversationId
    string InitiatorId
    string RequestId
    string SourceAddress
    string DestinationAddress
    string ResponseAddress
    string FaultAddress
    DateTime? ExpirationTime
    IDictionary<string, object> Headers
    object Message
    string[] MessageType
    HostInfo Host
    

    文档中有full article about interoperability

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-13
      • 2018-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多