rabbitmq rpc 消息格式及调用封装
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
342 B

  1. package rabbitmqrpc
  2. import (
  3. "testing"
  4. )
  5. func Test_Send(t *testing.T) {
  6. exchange := "send_msg"
  7. key := "api"
  8. msg := map[string]interface{}{
  9. "site_id": "100002",
  10. "dbname": "testing",
  11. "data": map[string]string{
  12. "order_id": "111",
  13. "order_sn": "cccc",
  14. },
  15. }
  16. ret, err := Send(exchange, key, msg)
  17. t.Log(ret)
  18. t.Log(err)
  19. }