Persistence mongodb #84

Merged
rahimiankeanu merged 8 commits from Persistence-mongodb into dev 2021-11-21 20:18:15 +00:00
5 changed files with 8 additions and 6 deletions
Showing only changes of commit ad27697bc7 - Show all commits

View File

@ -58,7 +58,7 @@ public class TapasAuctionHouseApplication {
private static void bootstrapMarketplaceWithMqtt() { private static void bootstrapMarketplaceWithMqtt() {
try { try {
String broker = ENVIRONMENT.getProperty("mqtt.broker.uri"); String broker = ENVIRONMENT.getProperty("mqtt.broker.uri");
LOGGER.info("Bootstrapping Mqtt");
if (broker == null) { if (broker == null) {
broker = DEFAULT_MQTT_BROKER; broker = DEFAULT_MQTT_BROKER;
LOGGER.info("No MQTT broker was set in application.propreties, going with default: " LOGGER.info("No MQTT broker was set in application.propreties, going with default: "

View File

@ -25,9 +25,9 @@ import java.sql.Timestamp;
public class ExternalAuctionStartedEventListenerMqttAdapter extends AuctionEventMqttListener{ public class ExternalAuctionStartedEventListenerMqttAdapter extends AuctionEventMqttListener{
private static final Logger LOGGER = LogManager.getLogger(ExternalAuctionStartedEventListenerMqttAdapter.class); private static final Logger LOGGER = LogManager.getLogger(ExternalAuctionStartedEventListenerMqttAdapter.class);
String auctionHouseURI = "http://tapas-auction-house.86-119-35-40.nip.io/"; String auctionHouseURI = "https://tapas-auction-house.86-119-35-40.nip.io/";
String taskListURI = "http://tapas-tasks.86-119-35-40.nip.io"; String taskListURI = "https://tapas-tasks.86-119-35-40.nip.io";
@Override @Override
public boolean handleEvent(MqttMessage message){ public boolean handleEvent(MqttMessage message){

View File

@ -32,7 +32,7 @@ public class AddBidWebController {
new Bid.BidderTaskListUri(URI.create(payload.getBidderTaskListUri())) new Bid.BidderTaskListUri(URI.create(payload.getBidderTaskListUri()))
)); ));
LOGGER.info("Bid received", payload); LOGGER.info("Bid received:" + payload);
BidReceivedHandler bidReceivedHandler = new BidReceivedHandler(); BidReceivedHandler bidReceivedHandler = new BidReceivedHandler();
bidReceivedHandler.handleNewBidReceivedEvent(bidReceivedEvent); bidReceivedHandler.handleNewBidReceivedEvent(bidReceivedEvent);

View File

@ -57,9 +57,11 @@ public class AuctionWonEventHttpAdapter implements AuctionWonEventPort {
new Task.ServiceProvider("TODO") new Task.ServiceProvider("TODO")
); );
var bidderAuctionHouseUri = event.getWinningBid().getBidderAuctionHouseUri().getValue().toString();
String body = TaskJsonRepresentation.serialize(task); String body = TaskJsonRepresentation.serialize(task);
LOGGER.info(body); LOGGER.info(body);
var postURI = URI.create(auction.get().getAuctionHouseUri().getValue().toString() + "/taskwinner"); var postURI = URI.create(bidderAuctionHouseUri + "/taskwinner");
LOGGER.info(postURI);
HttpRequest postRequest = HttpRequest.newBuilder() HttpRequest postRequest = HttpRequest.newBuilder()
.uri(postURI) .uri(postURI)
.header("Content-Type", TaskJsonRepresentation.MEDIA_TYPE) .header("Content-Type", TaskJsonRepresentation.MEDIA_TYPE)

View File

@ -4,7 +4,7 @@ websub.hub=https://websub.appspot.com/
websub.hub.publish=https://websub.appspot.com/ websub.hub.publish=https://websub.appspot.com/
group=tapas-group-tutors group=tapas-group-tutors
auction.house.uri=http://tapas-auction-house.86-119-35-40.nip.io auction.house.uri=https://tapas-auction-house.86-119-35-40.nip.io
tasks.list.uri=http://localhost:8081 tasks.list.uri=http://localhost:8081
application.environment=development application.environment=development