alikelleci removed a comment on issue #5840: Subscription mode Key_Shared not 
working as expected
URL: https://github.com/apache/pulsar/issues/5840#issuecomment-564934733
 
 
   Hi, below is the code for the producer:
   
   `@Slf4j
   @RestController
   @RequestMapping(value = "/customers")
   public class CustomerController {
   
     @Autowired
     private Producer<Customer> producer;
   
     @GetMapping(value = "/create/{id}")
     public void create(@PathVariable String id) throws PulsarClientException {
       Faker faker = new Faker();
       producer.newMessage()
           .key(id)
           .value(Customer.builder()
               .id(id)
               .firstName(faker.name().firstName())
               .lastName(faker.name().lastName())
               .address(faker.address().streetAddress())
               .postal(faker.address().zipCode())
               .city(faker.address().city())
               .country(faker.address().country())
               .credit(100)
               .build())
           .send();
     }
   }`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to