{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6376","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6376/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6376/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6376/events","html_url":"https://github.com/spring-projects/spring-boot/issues/6376","id":165024724,"number":6376,"title":"spring-boot-autoconfigure: add support to connect to Hornetq clusters","user":{"login":"leflamm","id":3337944,"avatar_url":"https://avatars.githubusercontent.com/u/3337944?v=3","gravatar_id":"","url":"https://api.github.com/users/leflamm","html_url":"https://github.com/leflamm","followers_url":"https://api.github.com/users/leflamm/followers","following_url":"https://api.github.com/users/leflamm/following{/other_user}","gists_url":"https://api.github.com/users/leflamm/gists{/gist_id}","starred_url":"https://api.github.com/users/leflamm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leflamm/subscriptions","organizations_url":"https://api.github.com/users/leflamm/orgs","repos_url":"https://api.github.com/users/leflamm/repos","events_url":"https://api.github.com/users/leflamm/events{/privacy}","received_events_url":"https://api.github.com/users/leflamm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/feedback-provided","name":"feedback-provided","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-12T08:46:42Z","updated_at":"2016-07-12T09:29:20Z","closed_at":"2016-07-12T09:29:20Z","body":"Our Spring Boot applications need to connect to Hornetq clusters. Currently we're adding the following extra configuration class. It creates an array of ``TransportConfiguration`` using a custom property (here called) ``foo.bar.authorities`` containing a list of comma-separated Hornetq hosts.\r\n\r\nClass has been simplified, e. g. authorization has been intentionally left out here to keep it simple.\r\n\r\n```java\r\n@Configuration\r\npublic class JmsConfig {\r\n    @Bean\r\n    HornetQJMSConnectionFactory hornetqFactory(\r\n            @NonNull @Value(\"${foo.bar.authorities}\") String authorities) {\r\n        List<TransportConfiguration> configs = Arrays.stream(authorities.split(\",\")).map(\r\n                String::toLowerCase).map(String::trim).map(JmsConfig::fromAuthority).collect(\r\n                        Collectors.toList());\r\n\r\n        return new HornetQJMSConnectionFactory(true, Iterables\r\n                .toArray(configs, TransportConfiguration.class));\r\n    }\r\n\r\n    static TransportConfiguration fromAuthority(@NonNull String authority) {\r\n        String[] hostAndPort = authority.split(\":\");\r\n        checkState(hostAndPort.length == 2);\r\n        checkState(!hostAndPort[0].isEmpty());\r\n        checkState(!hostAndPort[1].isEmpty());\r\n        return new TransportConfiguration(NettyConnectorFactory.class.getName(), ImmutableMap.of(\r\n                \"host\", hostAndPort[0], \"port\", hostAndPort[1]));\r\n    }\r\n}\r\n```\r\nI'd like to provide a PR to add support to spring-boot-autoconfigure (``HornetQProperties`` and ``HornetQConnectionFactoryFactory``) to make this work out of the box. I have a couple of questions regarding this:\r\n- is there another solution for what I try to solve\r\n- is it possible to introduce a new property like ``spring.hornetq.authorities``\r\n- does it make sense to provide PRs for ``org.springframework.boot.autoconfigure.jms.hornetq`` or is this pretty much dead?\r\n\r\nThanks Christian.\r\nUsing ``spring-boot-starter-hornetq`` in version ``1.3.5.RELEASE`` "},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/231986720","html_url":"https://github.com/spring-projects/spring-boot/issues/6376#issuecomment-231986720","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6376","id":231986720,"user":{"login":"leflamm","id":3337944,"avatar_url":"https://avatars.githubusercontent.com/u/3337944?v=3","gravatar_id":"","url":"https://api.github.com/users/leflamm","html_url":"https://github.com/leflamm","followers_url":"https://api.github.com/users/leflamm/followers","following_url":"https://api.github.com/users/leflamm/following{/other_user}","gists_url":"https://api.github.com/users/leflamm/gists{/gist_id}","starred_url":"https://api.github.com/users/leflamm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leflamm/subscriptions","organizations_url":"https://api.github.com/users/leflamm/orgs","repos_url":"https://api.github.com/users/leflamm/repos","events_url":"https://api.github.com/users/leflamm/events{/privacy}","received_events_url":"https://api.github.com/users/leflamm/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T09:29:20Z","updated_at":"2016-07-12T09:29:20Z","body":"Closing HornetQ-specific issue."}}
{"actor":{"display_login":"leflamm"}}