AutoTag set automatically generated tag like this fmt.Sprintf(QueueName+"-pid-%d@%s", os.Getpid(), os.Hostname())
()
| 125 | // AutoTag set automatically generated tag like this |
| 126 | // fmt.Sprintf(QueueName+"-pid-%d@%s", os.Getpid(), os.Hostname()) |
| 127 | func AutoTag() ConsumerOpt { |
| 128 | return func(c *Consumer) { |
| 129 | host, _ := os.Hostname() |
| 130 | tag := fmt.Sprintf(c.q.Name+"-pid-%d@%s", os.Getpid(), host) |
| 131 | Tag(tag)(c) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | // AutoAck set this consumer in AutoAck mode |
| 136 | func AutoAck() ConsumerOpt { |