Files
Artem Bilan 02de8a2e91 URL Cleanup
This commit updates URLs to prefer the https protocol.
Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status.
While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 238 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 18:57:31 -04:00
..
2018-11-05 14:11:17 -05:00
2019-03-21 18:57:31 -04:00
2018-11-05 14:11:17 -05:00
2019-03-16 12:58:42 -04:00
2019-03-16 12:58:42 -04:00
2019-03-16 12:58:42 -04:00
2018-11-05 14:11:17 -05:00

== Sample 2

This sample demonstrates a simple producer and a multi-method consumer; the producer sends objects of types `Foo1` and `Bar1` and the consumer receives objects of type `Foo2` and `Bar2` (the objects have the same field, `foo`).

The producer uses a `JsonSerializer`; the consumer uses the `StringDeserializer` that is automatically configured by Spring Boot, together with a `StringJsonMessageConverter` which converts to the required type of the listener method argument.
We can't infer the type in this case (because the type is used to choose the method to call).
We therefore configure type mapping on the producer and consumer side.
See the `application.yml` for the producer side and the `converter` bean on the consumer side.

The `MultiMethods` `@KafkaListener` has 3 methods; one for each of the known objects and a fallback default method for others.

Run the application and use curl to send some data:

`$ curl -X POST http://localhost:8080/send/foo/bar`

`$ curl -X POST http://localhost:8080/send/bar/baz`

`$ curl -X POST http://localhost:8080/send/unknown/xxx`

Console:

`Received: Foo2 [foo=bar]`
`Received: Bar2 [bar=baz]`
`Received unknown: xxx`