Skip to content

Commit

Permalink
Merge pull request #19 from AxonFramework/fix/eureka_registration
Browse files Browse the repository at this point in the history
[#18] Instance registration fails with Eureka
  • Loading branch information
smcvb authored Apr 21, 2020
2 parents 50a95c3 + aaf5006 commit ac1fe09
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static Builder builder() {
*/
public static boolean serviceInstanceMetadataContainsMessageRoutingInformation(ServiceInstance serviceInstance) {
Map<String, String> serviceInstanceMetadata = serviceInstance.getMetadata();
return serviceInstanceMetadata != null &&
return serviceInstanceMetadata != null &&
serviceInstanceMetadata.containsKey(LOAD_FACTOR) &&
serviceInstanceMetadata.containsKey(SERIALIZED_COMMAND_FILTER) &&
serviceInstanceMetadata.containsKey(SERIALIZED_COMMAND_FILTER_CLASS_NAME);
Expand Down Expand Up @@ -325,11 +325,10 @@ private boolean isLocalServiceInstance(ServiceInstance serviceInstance) {

private Member buildLocalMember(ServiceInstance localServiceInstance) {
String localServiceId = localServiceInstance.getServiceId();
URI serviceWithContextRootUri = buildRemoteUriWithContextRoot(localServiceInstance);
URI emptyEndpoint = null;
//noinspection ConstantConditions | added null variable for clarity
return registered
? new SimpleMember<>(buildSimpleMemberName(localServiceId, serviceWithContextRootUri),
? new SimpleMember<>(buildSimpleMemberName(localServiceId, buildRemoteUriWithContextRoot(localServiceInstance)),
localServiceInstance.getUri(),
SimpleMember.LOCAL_MEMBER,
this::suspect)
Expand Down

0 comments on commit ac1fe09

Please sign in to comment.