//using Microsoft.AspNetCore.Mvc; //using Microsoft.Extensions.Logging; //using System; //using System.IO; //using System.Threading.Tasks; //namespace FrameworkSL.Controllers.SchedulerTaskGenerator //{ // [ApiController] // [Route("scheduler-binding")] // public class SchedulerBindingController : ControllerBase // { // private readonly ILogger _logger; // public SchedulerBindingController(ILogger logger) // { // _logger = logger; // } // // Handle CORS preflight from Dapr // [HttpOptions] // public IActionResult Options() // { // Response.Headers.Add("Allow", "POST,OPTIONS"); // return Ok(); // } // // Dapr will POST RabbitMQ messages here // [HttpPost] // public async Task ReceiveMessage() // { // try // { // using var sr = new StreamReader(Request.Body); // var body = await sr.ReadToEndAsync(); // _logger.LogInformation("Received RabbitMQ Message via Dapr Binding: {Body}", body); // Console.WriteLine("🔥 Incoming message from RabbitMQ via Dapr binding:"); // Console.WriteLine(body); // return Ok(); // } // catch (Exception ex) // { // _logger.LogError(ex, "Error handling scheduler binding message"); // return StatusCode(500, "Failed to process message"); // } // } // } //}