Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .agents/task.md

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ env:
ECR_REGISTRY: 315084008680.dkr.ecr.eu-central-1.amazonaws.com

jobs:
deploy:
name: Build, Push and Deploy
build:
name: Build and Push Image
runs-on: ubuntu-latest
environment: production
outputs:
image: ${{ steps.build-image.outputs.image }}

steps:
- name: Checkout
Expand Down Expand Up @@ -45,6 +46,13 @@ jobs:
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT

deploy:
name: Deploy to AWS EC2
needs: build
runs-on: ubuntu-latest
environment: production

steps:
- name: Deploy to EC2 instance
uses: appleboy/ssh-action@v1.0.3
with:
Expand All @@ -57,7 +65,7 @@ jobs:
aws ecr get-login-password --region ${{ env.AWS_REGION }} | docker login --username AWS --password-stdin ${{ env.ECR_REGISTRY }}

# Pull the latest image from ECR
docker pull ${{ steps.build-image.outputs.image }}
docker pull ${{ needs.build.outputs.image }}

# Execute the deployment script located in the EC2 user's home directory
# Pass environment variables to the script
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ http-client.private.env.json

src/main/resources/google-credentials.json
src/main/resources/firebase-service-account.json
*.iml
.agents
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.xtraction.api.billing.payment.common.events;

import com.xtraction.api.core.kafka.KafkaTopicRegistry;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Expand Down Expand Up @@ -39,9 +40,9 @@ public PaymentEventListener(PaymentEventProcessor eventProcessor) {
* spring.kafka.listener.concurrency=6
*/
@KafkaListener(
topics = PaymentTopicConfig.TOPIC_PAYMENT_EVENTS,
topics = KafkaTopicRegistry.PAYMENT_EVENTS,
groupId = "unraveldocs-payment-processor",
containerFactory = "paymentBatchListenerContainerFactory",
containerFactory = "kafkaBatchListenerContainerFactory",
concurrency = "${payment.kafka.consumer.concurrency:6}"
)
public void onPaymentEvents(
Expand Down Expand Up @@ -81,9 +82,9 @@ public void onPaymentEvents(
* Separate consumer group for independent scaling.
*/
@KafkaListener(
topics = PaymentTopicConfig.TOPIC_PAYMENT_WEBHOOKS,
topics = KafkaTopicRegistry.PAYMENT_WEBHOOKS,
groupId = "unraveldocs-webhook-processor",
containerFactory = "paymentBatchListenerContainerFactory",
containerFactory = "kafkaBatchListenerContainerFactory",
concurrency = "${payment.kafka.webhook-consumer.concurrency:4}"
)
public void onWebhookEvents(
Expand Down Expand Up @@ -111,7 +112,7 @@ public void onWebhookEvents(
* Lower volume, so single processing is fine.
*/
@KafkaListener(
topics = PaymentTopicConfig.TOPIC_SUBSCRIPTION_EVENTS,
topics = KafkaTopicRegistry.SUBSCRIPTION_EVENTS,
groupId = "unraveldocs-subscription-processor",
containerFactory = "kafkaListenerContainerFactory"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.xtraction.api.billing.payment.common.events;

import com.xtraction.api.core.kafka.KafkaTopicRegistry;
import com.xtraction.api.integration.broker.core.Message;
import com.xtraction.api.integration.broker.core.MessageResult;
import com.xtraction.api.integration.broker.kafka.producer.KafkaMessageProducer;
Expand Down Expand Up @@ -120,7 +121,7 @@ public MessageResult publishSync(PaymentEvent event) {
* This allows for separate topics for different event categories if needed.
*/
private String resolveTopicForEvent() {
return PaymentTopicConfig.TOPIC_PAYMENT_EVENTS;
return KafkaTopicRegistry.PAYMENT_EVENTS;
}

/**
Expand Down

This file was deleted.

Loading
Loading