-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7944955
commit 862cf19
Showing
26 changed files
with
674 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/api/show-api/src/main/java/com/example/mq/MessagePublisher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.mq; | ||
|
||
import com.example.mq.message.ArtistSubscriptionServiceMessage; | ||
import com.example.mq.message.GenreSubscriptionServiceMessage; | ||
import com.example.mq.message.ShowRelationArtistAndGenreServiceMessage; | ||
import com.example.mq.message.TicketingReservationServiceMessage; | ||
import java.util.List; | ||
|
||
public interface MessagePublisher { | ||
|
||
void publishShow(String topic, ShowRelationArtistAndGenreServiceMessage message); | ||
|
||
void publishArtistSubscription(String topic, List<ArtistSubscriptionServiceMessage> messages); | ||
|
||
void publishGenreSubscription(String topic, List<GenreSubscriptionServiceMessage> messages); | ||
|
||
void publishTicketingReservation(String topic, List<TicketingReservationServiceMessage> messages); | ||
} |
18 changes: 18 additions & 0 deletions
18
app/api/show-api/src/main/java/com/example/mq/message/ArtistSubscriptionServiceMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.mq.message; | ||
|
||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.entity.ArtistSubscription; | ||
|
||
@Builder | ||
public record ArtistSubscriptionServiceMessage( | ||
UUID userId, | ||
UUID artistId | ||
) { | ||
public static ArtistSubscriptionServiceMessage from(ArtistSubscription artistSubscription) { | ||
return ArtistSubscriptionServiceMessage.builder() | ||
.userId(artistSubscription.getUserId()) | ||
.artistId(artistSubscription.getArtistId()) | ||
.build(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/api/show-api/src/main/java/com/example/mq/message/GenreSubscriptionServiceMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.example.mq.message; | ||
|
||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.entity.GenreSubscription; | ||
|
||
@Builder | ||
public record GenreSubscriptionServiceMessage( | ||
UUID userId, | ||
UUID genreId | ||
) { | ||
|
||
public static GenreSubscriptionServiceMessage from(GenreSubscription genreSubscription) { | ||
return GenreSubscriptionServiceMessage.builder() | ||
.userId(genreSubscription.getUserId()) | ||
.genreId(genreSubscription.getGenreId()) | ||
.build(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ow-api/src/main/java/com/example/mq/message/ShowRelationArtistAndGenreServiceMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.example.mq.message; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ShowRelationArtistAndGenreServiceMessage( | ||
List<UUID> artistIds, | ||
List<UUID> genreIds | ||
) { | ||
|
||
public static ShowRelationArtistAndGenreServiceMessage of(List<UUID> artistIds, List<UUID> genreIds) { | ||
return ShowRelationArtistAndGenreServiceMessage.builder() | ||
.artistIds(artistIds) | ||
.genreIds(genreIds) | ||
.build(); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...api/show-api/src/main/java/com/example/mq/message/TicketingReservationServiceMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.example.mq.message; | ||
|
||
import com.example.show.controller.vo.TicketingApiType; | ||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
public record TicketingReservationServiceMessage( | ||
LocalDateTime reserveAt, | ||
String showName, | ||
TicketingApiType type, | ||
UUID userId, | ||
UUID showId | ||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.