失败确认

在生产者通过channel的basicPublish方法发布消息时,通常有几个参数需要设置,为此我们有必要了解清楚这些参数代表的具体含义及其作用,查看Channel接口,会发现存在3个重载的basicPublish方法

void basicPublish(String exchange, String routingKey, BasicProperties props, byte[] body) throws IOException;

void basicPublish(String exchange, String routingKey, boolean mandatory, BasicProperties props, byte[] body)
            throws IOException;

void basicPublish(String exchange, String routingKey, boolean mandatory, boolean immediate, BasicProperties props, byte[] body)
            throws IOException;
View Code

相关文章:

  • 2021-06-20
  • 2021-08-10
  • 2021-10-10
  • 2022-12-23
  • 2021-09-16
  • 2021-08-04
  • 2021-10-12
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2021-08-24
  • 2021-09-12
相关资源
相似解决方案