// Path: demo-service-interface/src/main/java/app/demo/api/product/kafka/ProductUpdatedMessage.java
// public class ProductUpdatedMessage {
//     @NotNull(message = "id is required")
//     @Property(name = "id")
//     public String id;
// 
//     @NotBlank
//     @Property(name = "name")
//     public String name;
// 
//     @Property(name = "desc")
//     public String desc;
// }


import app.demo.api.product.kafka.ProductUpdatedMessage;
import core.framework.inject.Inject;
import core.framework.kafka.MessagePublisher;
import core.framework.log.ActionLogContext;
import core.framework.web.Controller;
import core.framework.web.Request;
import core.framework.web.Response;
package app.demo.product.web;


/**
 * @author neo
 */
public class ProductUpdatedMessageTestController implements Controller {
    @Inject
    MessagePublisher<ProductUpdatedMessage> publisher;

    @Override
    public Response execute(Request request) {
        ActionLogContext.triggerTrace(true);
        for (int i = 0; i < 10; i++) {
            ProductUpdatedMessage value = new ProductUpdatedMessage();
// Path: demo-service-interface/src/main/java/app/demo/api/product/kafka/ProductUpdatedMessage.java
// public class ProductUpdatedMessage {
//     @NotNull(message = "id is required")
//     @Property(name = "id")
//     public String id;
// 
//     @NotBlank
//     @Property(name = "name")
//     public String name;
// 
//     @Property(name = "desc")
//     public String desc;
// }


// Path: demo-service/src/main/java/app/demo/product/web/ProductUpdatedMessageTestController.java
import app.demo.api.product.kafka.ProductUpdatedMessage;
import core.framework.inject.Inject;
import core.framework.kafka.MessagePublisher;
import core.framework.log.ActionLogContext;
import core.framework.web.Controller;
import core.framework.web.Request;
import core.framework.web.Response;

package app.demo.product.web;


/**
 * @author neo
 */
public class ProductUpdatedMessageTestController implements Controller {
    @Inject
    MessagePublisher<ProductUpdatedMessage> publisher;

    @Override
    public Response execute(Request request) {
        ActionLogContext.triggerTrace(true);
        for (int i = 0; i < 10; i++) {
            ProductUpdatedMessage value = new ProductUpdatedMessage();
            value.id = String.valueOf(i);