Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added update product api changes with price change event #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MadhanChiluka
Copy link
Collaborator

No description provided.

@harshaghanta
Copy link
Owner

Move the IntegrationEventLog related changes to a different project.

System.out.println("publishThroughEventBus " +event);
eventLogService.markEventAsInProgress(event.getId()).then(eventBus.publish(event))
.then(eventLogService.markEventAsPublished(event.getId()));
return Mono.empty();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why return Mono.empty() ? return the chaining of Monos ? I guess that itself will return mono



public Mono<Void> saveEventAndCatalogChanges(IntegrationEvent event, CatalogItem requestedItem) {
catalogItemRepository.save(requestedItem);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chaining not implemented here.

<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-mssql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<version>0.9.0.RELEASE</version>
Copy link
Collaborator Author

@MadhanChiluka MadhanChiluka May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowered r2dbc version to fix ClassCastException from Long to Integer while saving IntegrationEventLogEntry entity
Ref : spring-projects/spring-framework#28864

private EventStateEnum(int value) {
this.value = value;
}
public int getValue() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added getValue for Enum as navchar2(Ex : EventStateEnum.NOT_PUBLISHED) cannot be persisted to int in db.
Need to revisit


@Override
@Transient
public boolean isNew() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added super class of Peristable for the similar error
Failed to update table [user]. Row with Id [475471b9-118a-401b-a505-03c701560f9e1579010919455] does not exist

spring-projects/spring-data-r2dbc#275

}

@PersistenceConstructor
public IntegrationEventLogEntry(UUID eventId, String content, LocalDateTime creationTime, String eventTypeName,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added another constructor to make transient fields non require

spring-projects/spring-data-r2dbc#320 (comment)

spring-projects/spring-data-r2dbc#320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants