spring-boot-autoconfigure-1.5.4.RELEASE rabbitmq配置

#https://blog.csdn.net/en_joker/article/details/80103519
#https://docs.spring.io/spring-amqp/docs/1.5.4.RELEASE/reference/html/_reference.html#containerAttributes
#https://www.cnblogs.com/qts-hope/p/11242559.html
spring.rabbitmq:
  #RabbitMQ的主機地址 checked
  host: ${rabbitmq.server.hostname:rabbitmq.kyeapi.com}
  #RabbitMQ的端口號 checked
  port: ${rabbitmq.server.port:5672}
  #登陸到RabbitMQ的用戶名 checked
  username: admin
  #登陸到RabbitMQ的密碼 checked
  password: admin
  #ssl:
    #啓用SSL支持 checked
    #enabled: false
    #保存SSL證書的地址 checked
    #key-store:
    #訪問SSL證書的地址使用的密碼 checked
    #key-store-password:
    #SSL的可信地址 checked
    #trustStore:
    #訪問SSL的可信地址的密碼 checked
    #trust-store-password:
    #SSL算法,默認使用Rabbit的客戶端算法庫 checked
  #algorithm:
  #鏈接到RabbitMQ的虛擬主機 checked
  #virtualHost:
  #客戶端鏈接的地址,有多個的時候使用逗號分隔,該地址能夠是IP與Port的結合 (優先取addresses,而後再取host) checked
  #addresses:
  #Requested heartbeat timeout, in seconds; zero for none.秒 請求心跳超時時間,單位爲秒 checked
  requested-heartbeat: 60
  #Enable publisher confirms. 開啓Publisher Confirm機制 是否啓用【發佈確認】 checked
  publisher-confirms: false
  # Enable publisher returns. 	開啓publisher Return機制 是否啓用【發佈返回】 checked
  publisher-returns: false
  #毫秒,Connection timeout, in milliseconds; zero for infinite.鏈接超時參數單位爲毫秒:設置爲「0」表明無窮大 checked
  connnection-timeout: 60000
  #默認建立一個AmqpAdmin的Bean checked
  dynamic: true
  cache:
    channel:
      #Number of channels to retain in the cache. When "check-timeout" > 0, max * channels per connection.緩存中保持的Channel數量 checked
      size: 25
      #Number of milliseconds to wait to obtain a channel if the cache size has * been reached. If 0, always create a new channel.當緩存已滿時,獲取Channel的等待時間,單位爲毫秒 checked
      checkout-timeout: 0
    connection:
      #Connection factory cache mode.鏈接緩存的模式 checked
      mode: CHANNEL
      #Number of connections to cache. Only applies when mode is CONNECTION.緩存的鏈接數 checked
      size: 1
  template:
    #若是爲空,使用publisherReturns的值 Enable mandatory messages. If a mandatory message cannot be routed to a queue * by the server, it will return an unroutable message with a Return method. 啓用強制信息 checked
    #mandatory:
    #Timeout for receive() operations. receive()方法的超時時間 checked
    receive-timeout: 0
    # Timeout for sendAndReceive() operations. sendAndReceive()方法的超時時間 checked
    reply-timeout: 5000
    retry:
      #Whether or not publishing retries are enabled. 設置爲true的時候RabbitTemplate可以實現重試 checked
      enabled: false
      #Maximum number of attempts to publish or deliver a message. 嘗試發佈消息的最大數量 checked
      max-attempts: 3
      #Interval between the first and second attempt to publish or deliver a message. 第一次與第二次發佈消息的時間間隔 checked
      initial-interval: 1000
      #A multiplier to apply to the previous retry interval. 上一次嘗試時間間隔的乘數 checked
      multiplier: 1.0
      #Maximum interval between attempts. 嘗試發佈消息的最大時間間隔 checked
      max-interval: 10000
  listener:
    simple:
      #Start the container automatically on startup. 啓動時自動啓動容器 checked
      autoStartup: true
      #Acknowledge mode of container.無默認值 容器的acknowledge模式 自動提交仍是手動提交 checked
      #acknowledgeMode:
      #Minimum number of consumers. 無 消費者的最小數量 checked
      #concurrency:
      #Maximum number of consumers. 無 消費者的最大數量 checked
      max-concurrency: 10
      #Number of messages to be handled in a single request. It should be greater than * or equal to the transaction size (if used). 無 在單個請求中處理的消息個數,他應該大於等於事務數量 checked
      #prefetch:
      #Number of messages to be processed in a transaction. For best results it should * be less than or equal to the prefetch count. 指定一個事務處理的消息數量,最好是小於等於prefetch的數量. 無
      #transaction-size:
      #Whether rejected deliveries are requeued by default; default true. 投遞失敗時是否從新排隊 checked
      default-requeue-rejected: true
      #How often idle container events should be published in milliseconds. 無默認值 多長時間發佈空閒容器時間,單位毫秒
      #idleEventInterval:
      retry:
        #Whether or not retries are stateless or stateful.  不論重試是有狀態的仍是無狀態的 checked
        stateless: true
    #spring-boot-autoconfigure-1.5.4.RELEASE 沒有找到 checked
    retry:
      # 設置爲true的時候RabbitTemplate可以實現重試 checked
      enabled: false
      #第一次與第二次發佈消息的時間間隔 checked
      initial-interval: 1000
      #嘗試投遞消息的最大數量 checked
      max-attempts: 3
      #兩次嘗試的最大時間間隔 checked
      max-interval: 10000
      #上一次嘗試時間間隔的乘數 checked
      multiplier: 1.0
      #是否無狀態的 checked
      stateless: true
      #在一個事務中處理的消息數量。爲了得到最佳效果,該值應設置爲小於等於每一個請求中處理的消息個數,即spring.rabbitmq.listener.prefetch的值 checked
      #transaction-size:
相關文章
相關標籤/搜索