You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/12 09:57:25 UTC

[GitHub] [pulsar] alikelleci commented on issue #5840: Subscription mode Key_Shared not working as expected

alikelleci commented 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:
users@infra.apache.org


With regards,
Apache Git Services