diff --git a/.deployment/docker-compose.yml b/.deployment/docker-compose.yml index f86baf5..0b83518 100644 --- a/.deployment/docker-compose.yml +++ b/.deployment/docker-compose.yml @@ -69,6 +69,7 @@ services: mqtt.broker.uri: tcp://broker.hivemq.com:1883 discovery.endpoint.uri: https://tapas-auction-house.86-119-34-242.nip.io auction.house.uri: https://tapas-auction-house.86-119-35-40.nip.io + tasks.list.uri: http://tapas-tasks.86-119-35-40.nip.io labels: - "traefik.enable=true" - "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)" diff --git a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/common/clients/WebSubSubscriber.java b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/common/clients/WebSubSubscriber.java index ea74603..c73faa0 100644 --- a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/common/clients/WebSubSubscriber.java +++ b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/common/clients/WebSubSubscriber.java @@ -101,6 +101,9 @@ public class WebSubSubscriber { return; } + System.out.println("HUB: " + hub); + System.out.println("TOPIC: " + topic); + HttpRequest request = HttpRequest.newBuilder() .uri(hubURI) .header("Content-Type", "application/x-www-form-urlencoded") diff --git a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/in/web/WinningBidWebController.java b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/in/web/WinningBidWebController.java index cad0538..453c109 100644 --- a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/in/web/WinningBidWebController.java +++ b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/in/web/WinningBidWebController.java @@ -27,9 +27,11 @@ public class WinningBidWebController { @PostMapping(path = "/taskwinner", consumes = TaskJsonRepresentation.MEDIA_TYPE) public ResponseEntity winningBid(@RequestBody TaskJsonRepresentation payload){ + LOGGER.info("New Task Winner"); try { var body = payload.serialize(); - LOGGER.info(body); + LOGGER.info("Task Winner body: " + body); + LOGGER.info("Task Winner taskListURI: " + taskListURI); var postURI = URI.create(taskListURI + "/tasks/"); HttpRequest postRequest = HttpRequest.newBuilder() .uri(postURI) @@ -40,7 +42,7 @@ public class WinningBidWebController { HttpClient client = HttpClient.newHttpClient(); var postResponse = client.send(postRequest, HttpResponse.BodyHandlers.ofString()); - LOGGER.info(postResponse.statusCode()); + LOGGER.info("Create task internally with status code: " + postResponse.statusCode()); HttpHeaders responseHeaders = new HttpHeaders(); diff --git a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/messaging/websub/PublishAuctionStartedEventWebSubAdapter.java b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/messaging/websub/PublishAuctionStartedEventWebSubAdapter.java index ccb1225..77e51a8 100644 --- a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/messaging/websub/PublishAuctionStartedEventWebSubAdapter.java +++ b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/messaging/websub/PublishAuctionStartedEventWebSubAdapter.java @@ -32,6 +32,7 @@ public class PublishAuctionStartedEventWebSubAdapter implements AuctionStartedEv @Override public void publishAuctionStartedEvent(AuctionStartedEvent event) { logger.info("AuctionHouse | Publish auction started over WebSub!"); + logger.info("AuctionHouse | AuctionHouseURI: " + auctionHouseUri + " WebSubHubUri: " + webSubHubUri); HttpClient client = HttpClient.newHttpClient();